home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / rawkey-0.2 / rawkey-0
Tape Archive  |  1994-10-24  |  30.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: rawkey-0

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory rawkey/, mode 711 , uid 625 , gid 6 , size 0 , seconds 5652611056, user rus, group users default
98% file data default
41% TrID Sybase iAnywhere database files default (weak)
36% TrID TAR - Tape ARchive (GNU) default
21% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU) default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 72 61 77 6b 65 79 2f 00 | 00 00 00 00 00 00 00 00 |rawkey/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 31 31 20 00 20 20 20 36 |.... 7|11 . 6|
|00000070| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 36 35 32 36 31 31 | 0 | 5652611|
|00000090| 30 35 36 20 20 31 30 33 | 36 33 00 20 35 00 00 00 |056 103|63. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 72 61 77 6b 65 79 2f 72 | 61 77 6b 65 79 2e 68 00 |rawkey/r|awkey.h.|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00000270| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00000280| 20 20 20 35 37 35 35 20 | 20 35 36 35 32 36 31 31 | 5755 | 5652611|
|00000290| 30 30 35 20 20 31 32 31 | 32 34 00 20 30 00 00 00 |005 121|24. 0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 2f 2a 20 6c 69 62 72 61 | 77 6b 65 79 20 76 30 2e |/* libra|wkey v0.|
|00000410| 32 20 2d 20 28 63 29 20 | 31 39 39 34 20 52 75 73 |2 - (c) |1994 Rus|
|00000420| 73 65 6c 6c 20 4d 61 72 | 6b 73 0a 20 2a 20 54 68 |sell Mar|ks. * Th|
|00000430| 69 73 20 6c 69 62 72 61 | 72 79 20 6d 61 79 20 62 |is libra|ry may b|
|00000440| 65 20 66 72 65 65 6c 79 | 20 75 73 65 64 2f 63 6f |e freely| used/co|
|00000450| 70 69 65 64 2f 6d 6f 64 | 69 66 69 65 64 20 70 72 |pied/mod|ified pr|
|00000460| 6f 76 69 64 65 64 20 74 | 68 69 73 20 63 6f 70 79 |ovided t|his copy|
|00000470| 72 69 67 68 74 0a 20 2a | 20 6e 6f 74 69 63 65 20 |right. *| notice |
|00000480| 69 73 20 6c 65 66 74 20 | 69 6e 74 61 63 74 2e 0a |is left |intact..|
|00000490| 20 2a 2f 0a 0a 0a 2f 2a | 20 73 63 61 6e 63 6f 64 | */.../*| scancod|
|000004a0| 65 73 20 66 72 6f 6d 20 | 50 69 6e 6b 20 53 68 69 |es from |Pink Shi|
|000004b0| 72 74 20 62 6f 6f 6b 20 | 2a 2f 0a 0a 2f 2a 20 72 |rt book |*/../* r|
|000004c0| 61 6e 64 6f 6d 20 6b 65 | 79 73 20 6e 6f 74 20 63 |andom ke|ys not c|
|000004d0| 6f 6e 76 65 72 65 64 20 | 61 6e 79 77 68 65 72 65 |onvered |anywhere|
|000004e0| 20 65 6c 73 65 20 62 65 | 6c 6f 77 20 2a 2f 0a 23 | else be|low */.#|
|000004f0| 64 65 66 69 6e 65 20 45 | 53 43 41 50 45 5f 4b 45 |define E|SCAPE_KE|
|00000500| 59 09 30 78 30 31 0a 23 | 64 65 66 69 6e 65 20 45 |Y.0x01.#|define E|
|00000510| 4e 54 45 52 5f 4b 45 59 | 09 32 38 0a 23 64 65 66 |NTER_KEY|.28.#def|
|00000520| 69 6e 65 20 42 41 43 4b | 53 50 41 43 45 09 31 34 |ine BACK|SPACE.14|
|00000530| 0a 23 64 65 66 69 6e 65 | 20 54 41 42 5f 4b 45 59 |.#define| TAB_KEY|
|00000540| 09 09 31 35 0a 0a 2f 2a | 20 73 68 69 66 74 73 20 |..15../*| shifts |
|00000550| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 4c 45 46 54 5f |*/.#defi|ne LEFT_|
|00000560| 53 48 49 46 54 09 30 78 | 32 41 0a 23 64 65 66 69 |SHIFT.0x|2A.#defi|
|00000570| 6e 65 20 52 49 47 48 54 | 5f 53 48 49 46 54 09 30 |ne RIGHT|_SHIFT.0|
|00000580| 78 33 36 0a 23 64 65 66 | 69 6e 65 20 4c 45 46 54 |x36.#def|ine LEFT|
|00000590| 5f 43 54 52 4c 09 30 78 | 31 44 0a 23 64 65 66 69 |_CTRL.0x|1D.#defi|
|000005a0| 6e 65 20 4c 45 46 54 5f | 41 4c 54 09 30 78 33 38 |ne LEFT_|ALT.0x38|
|000005b0| 0a 0a 2f 2a 20 4e 42 3a | 20 72 69 67 68 74 20 63 |../* NB:| right c|
|000005c0| 74 72 6c 20 73 65 6e 64 | 73 20 30 78 45 30 20 74 |trl send|s 0xE0 t|
|000005d0| 68 65 6e 20 4c 45 46 54 | 5f 43 54 52 4c 2c 20 72 |hen LEFT|_CTRL, r|
|000005e0| 69 67 68 74 20 61 6c 74 | 20 73 65 6e 64 73 20 30 |ight alt| sends 0|
|000005f0| 78 45 30 20 74 68 65 6e | 0a 20 2a 20 4c 45 46 54 |xE0 then|. * LEFT|
|00000600| 5f 41 4c 54 2e 20 49 66 | 20 79 6f 75 20 77 61 6e |_ALT. If| you wan|
|00000610| 74 20 74 6f 20 64 6f 20 | 61 6e 79 20 73 68 69 66 |t to do |any shif|
|00000620| 74 20 68 61 6e 64 6c 69 | 6e 67 2c 20 79 6f 75 20 |t handli|ng, you |
|00000630| 70 72 6f 62 61 62 6c 79 | 20 77 61 6e 74 20 74 6f |probably| want to|
|00000640| 0a 20 2a 20 6a 75 73 74 | 20 69 67 6e 6f 72 65 20 |. * just| ignore |
|00000650| 30 78 45 30 2c 20 61 6e | 64 20 6c 6f 6f 6b 20 66 |0xE0, an|d look f|
|00000660| 6f 72 20 4c 45 46 54 5f | 43 54 52 4c 20 61 6e 64 |or LEFT_|CTRL and|
|00000670| 20 4c 45 46 54 5f 41 4c | 54 2e 0a 20 2a 20 6e 6f | LEFT_AL|T.. * no|
|00000680| 74 65 20 74 68 61 74 20 | 75 73 69 6e 67 20 73 63 |te that |using sc|
|00000690| 61 6e 5f 6b 65 79 62 6f | 61 72 64 28 29 20 61 6e |an_keybo|ard() an|
|000006a0| 64 20 69 73 5f 6b 65 79 | 5f 70 72 65 73 73 65 64 |d is_key|_pressed|
|000006b0| 28 29 20 64 6f 65 73 20 | 74 68 69 73 20 66 6f 72 |() does |this for|
|000006c0| 20 79 6f 75 2e 0a 20 2a | 2f 0a 0a 2f 2a 20 66 75 | you.. *|/../* fu|
|000006d0| 6e 63 74 69 6f 6e 20 6b | 65 79 73 20 2a 2f 0a 0a |nction k|eys */..|
|000006e0| 2f 2a 20 74 68 69 73 20 | 6d 61 63 72 6f 20 6c 65 |/* this |macro le|
|000006f0| 74 73 20 79 6f 75 20 64 | 6f 20 74 68 69 6e 67 73 |ts you d|o things|
|00000700| 20 6c 69 6b 65 20 46 55 | 4e 43 5f 4b 45 59 28 31 | like FU|NC_KEY(1|
|00000710| 29 2c 20 46 55 4e 43 5f | 4b 45 59 28 32 29 2c 20 |), FUNC_|KEY(2), |
|00000720| 65 74 63 2e 20 75 70 20 | 74 6f 0a 20 2a 20 46 55 |etc. up |to. * FU|
|00000730| 4e 43 5f 4b 45 59 28 31 | 32 29 2e 0a 20 2a 20 64 |NC_KEY(1|2).. * d|
|00000740| 6f 6e 27 74 20 75 73 65 | 20 61 6e 79 20 73 69 64 |on't use| any sid|
|00000750| 65 2d 65 66 66 65 63 74 | 73 20 77 69 74 68 20 69 |e-effect|s with i|
|00000760| 74 2e 0a 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 46 |t.. */.#|define F|
|00000770| 55 4e 43 5f 4b 45 59 28 | 7a 29 09 28 30 78 33 41 |UNC_KEY(|z).(0x3A|
|00000780| 2b 28 7a 29 2b 28 28 7a | 29 3e 31 30 29 3f 31 38 |+(z)+((z|)>10)?18|
|00000790| 3a 30 29 0a 0a 2f 2a 20 | 63 75 72 73 6f 72 73 2c |:0)../* |cursors,|
|000007a0| 20 70 67 75 70 2c 20 70 | 67 64 6e 2c 20 65 74 63 | pgup, p|gdn, etc|
|000007b0| 2e 20 2a 2f 0a 0a 23 64 | 65 66 69 6e 65 20 43 55 |. */..#d|efine CU|
|000007c0| 52 53 4f 52 5f 4c 45 46 | 54 09 30 78 34 42 0a 23 |RSOR_LEF|T.0x4B.#|
|000007d0| 64 65 66 69 6e 65 20 43 | 55 52 53 4f 52 5f 52 49 |define C|URSOR_RI|
|000007e0| 47 48 54 09 30 78 34 44 | 0a 23 64 65 66 69 6e 65 |GHT.0x4D|.#define|
|000007f0| 20 43 55 52 53 4f 52 5f | 55 50 09 30 78 34 38 0a | CURSOR_|UP.0x48.|
|00000800| 23 64 65 66 69 6e 65 20 | 43 55 52 53 4f 52 5f 44 |#define |CURSOR_D|
|00000810| 4f 57 4e 09 30 78 35 30 | 0a 23 64 65 66 69 6e 65 |OWN.0x50|.#define|
|00000820| 20 4b 45 59 50 41 44 5f | 43 45 4e 54 45 52 09 30 | KEYPAD_|CENTER.0|
|00000830| 78 34 43 09 2f 2a 20 74 | 68 65 20 27 35 27 20 69 |x4C./* t|he '5' i|
|00000840| 6e 20 74 68 65 20 63 65 | 6e 74 72 65 20 6f 66 20 |n the ce|ntre of |
|00000850| 74 68 65 20 6b 65 79 70 | 61 64 20 2a 2f 0a 0a 23 |the keyp|ad */..#|
|00000860| 64 65 66 69 6e 65 20 49 | 4e 53 45 52 54 5f 4b 45 |define I|NSERT_KE|
|00000870| 59 09 30 78 35 32 0a 23 | 64 65 66 69 6e 65 20 44 |Y.0x52.#|define D|
|00000880| 45 4c 45 54 45 5f 4b 45 | 59 09 30 78 35 33 0a 23 |ELETE_KE|Y.0x53.#|
|00000890| 64 65 66 69 6e 65 20 48 | 4f 4d 45 5f 4b 45 59 09 |define H|OME_KEY.|
|000008a0| 30 78 34 37 0a 23 64 65 | 66 69 6e 65 20 45 4e 44 |0x47.#de|fine END|
|000008b0| 5f 4b 45 59 09 09 30 78 | 34 46 0a 23 64 65 66 69 |_KEY..0x|4F.#defi|
|000008c0| 6e 65 20 50 41 47 45 5f | 55 50 09 09 30 78 34 39 |ne PAGE_|UP..0x49|
|000008d0| 0a 23 64 65 66 69 6e 65 | 20 50 41 47 45 5f 44 4f |.#define| PAGE_DO|
|000008e0| 57 4e 09 30 78 35 31 0a | 0a 2f 2a 20 4e 42 3a 20 |WN.0x51.|./* NB: |
|000008f0| 74 68 65 20 27 67 72 65 | 79 27 20 63 75 72 73 6f |the 'gre|y' curso|
|00000900| 72 73 2c 20 70 67 75 70 | 2c 20 70 67 64 6e 20 65 |rs, pgup|, pgdn e|
|00000910| 74 63 2e 20 67 65 6e 65 | 72 61 74 65 20 30 78 45 |tc. gene|rate 0xE|
|00000920| 30 20 62 65 66 6f 72 65 | 20 73 65 6e 64 69 6e 67 |0 before| sending|
|00000930| 20 74 68 65 0a 20 2a 20 | 61 62 6f 76 65 20 63 6f | the. * |above co|
|00000940| 64 65 73 2e 20 54 68 65 | 20 65 61 73 69 65 73 74 |des. The| easiest|
|00000950| 20 77 61 79 20 74 6f 20 | 64 65 61 6c 20 77 69 74 | way to |deal wit|
|00000960| 68 20 74 68 69 73 20 69 | 73 20 74 6f 20 69 67 6e |h this i|s to ign|
|00000970| 6f 72 65 20 30 78 45 30 | 2e 20 3a 29 0a 20 2a 2f |ore 0xE0|. :). */|
|00000980| 0a 0a 23 64 65 66 69 6e | 65 20 43 41 50 53 5f 4c |..#defin|e CAPS_L|
|00000990| 4f 43 4b 09 30 78 33 41 | 0a 23 64 65 66 69 6e 65 |OCK.0x3A|.#define|
|000009a0| 20 4e 55 4d 5f 4c 4f 43 | 4b 09 30 78 34 35 0a 23 | NUM_LOC|K.0x45.#|
|000009b0| 64 65 66 69 6e 65 20 53 | 43 52 4f 4c 4c 5f 4c 4f |define S|CROLL_LO|
|000009c0| 43 4b 09 30 78 34 36 0a | 0a 2f 2a 20 50 72 69 6e |CK.0x46.|./* Prin|
|000009d0| 74 53 63 72 65 65 6e 20 | 67 65 6e 65 72 61 74 65 |tScreen |generate|
|000009e0| 73 20 45 30 2c 20 32 41 | 2c 20 45 30 2c 20 33 37 |s E0, 2A|, E0, 37|
|000009f0| 2e 09 28 30 78 36 33 3f | 29 0a 20 2a 20 50 61 75 |..(0x63?|). * Pau|
|00000a00| 73 65 20 67 65 6e 65 72 | 61 74 65 73 20 45 31 2c |se gener|ates E1,|
|00000a10| 20 31 30 2c 20 34 35 2e | 09 09 09 28 30 78 37 37 | 10, 45.|...(0x77|
|00000a20| 3f 29 0a 20 2a 20 49 20 | 6c 65 61 76 65 20 69 74 |?). * I |leave it|
|00000a30| 20 75 70 20 74 6f 20 79 | 6f 75 20 68 6f 77 20 74 | up to y|ou how t|
|00000a40| 6f 20 66 69 67 75 72 65 | 20 74 68 6f 73 65 20 74 |o figure| those t|
|00000a50| 77 6f 20 6f 75 74 20 70 | 72 6f 70 65 72 6c 79 2c |wo out p|roperly,|
|00000a60| 0a 20 2a 20 62 75 74 20 | 74 68 65 20 65 61 73 69 |. * but |the easi|
|00000a70| 65 73 74 20 77 61 79 20 | 69 73 20 74 6f 20 69 67 |est way |is to ig|
|00000a80| 6e 6f 72 65 20 74 68 65 | 6d 2e 20 3a 2d 2f 0a 20 |nore the|m. :-/. |
|00000a90| 2a 2f 0a 0a 23 64 65 66 | 69 6e 65 20 47 52 41 59 |*/..#def|ine GRAY|
|00000aa0| 5f 50 4c 55 53 09 30 78 | 34 45 0a 23 64 65 66 69 |_PLUS.0x|4E.#defi|
|00000ab0| 6e 65 20 47 52 41 59 5f | 4d 49 4e 55 53 09 30 78 |ne GRAY_|MINUS.0x|
|00000ac0| 34 41 0a 23 64 65 66 69 | 6e 65 20 47 52 41 59 5f |4A.#defi|ne GRAY_|
|00000ad0| 4d 55 4c 54 49 50 4c 59 | 09 30 78 33 37 09 2f 2a |MULTIPLY|.0x37./*|
|00000ae0| 20 4e 42 3a 20 61 6c 73 | 6f 20 67 65 6e 27 64 20 | NB: als|o gen'd |
|00000af0| 62 79 20 50 72 74 53 63 | 2c 20 73 65 65 20 61 62 |by PrtSc|, see ab|
|00000b00| 6f 76 65 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 47 |ove */.#|define G|
|00000b10| 52 41 59 5f 44 49 56 49 | 44 45 09 30 78 33 36 09 |RAY_DIVI|DE.0x36.|
|00000b20| 2f 2a 20 4e 42 3a 20 70 | 72 65 66 69 78 65 64 20 |/* NB: p|refixed |
|00000b30| 62 79 20 30 78 45 30 20 | 2a 2f 0a 0a 0a 0a 2f 2a |by 0xE0 |*/..../*|
|00000b40| 20 66 6f 72 20 6d 6f 73 | 74 20 6f 74 68 65 72 20 | for mos|t other |
|00000b50| 6b 65 79 73 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |keys, yo|u should|
|00000b60| 20 75 73 65 20 74 68 65 | 20 6b 65 79 6d 61 70 5f | use the| keymap_|
|00000b70| 74 72 61 6e 73 28 29 20 | 66 75 6e 63 74 69 6f 6e |trans() |function|
|00000b80| 20 74 6f 0a 20 2a 20 63 | 6f 6e 76 65 72 74 20 74 | to. * c|onvert t|
|00000b90| 68 65 20 73 63 61 6e 63 | 6f 64 65 20 74 6f 20 77 |he scanc|ode to w|
|00000ba0| 68 61 74 65 76 65 72 20 | 74 68 65 20 6b 65 79 6d |hatever |the keym|
|00000bb0| 61 70 20 77 6f 75 6c 64 | 20 6e 6f 72 6d 61 6c 6c |ap would| normall|
|00000bc0| 79 20 67 65 6e 65 72 61 | 74 65 2e 0a 20 2a 2f 0a |y genera|te.. */.|
|00000bd0| 0a 0a 0a 2f 2a 20 70 72 | 6f 74 6f 74 79 70 65 73 |.../* pr|ototypes|
|00000be0| 20 2a 2f 0a 0a 2f 2a 20 | 4e 42 3a 20 69 74 20 69 | */../* |NB: it i|
|00000bf0| 73 20 2a 76 69 74 61 6c | 2a 20 74 68 61 74 20 79 |s *vital|* that y|
|00000c00| 6f 75 20 63 61 6c 6c 20 | 72 61 77 6d 6f 64 65 5f |ou call |rawmode_|
|00000c10| 65 78 69 74 28 29 20 77 | 68 65 6e 20 79 6f 75 20 |exit() w|hen you |
|00000c20| 66 69 6e 69 73 68 2c 20 | 6f 72 0a 20 2a 20 65 6c |finish, |or. * el|
|00000c30| 73 65 20 79 6f 75 27 6c | 6c 20 62 65 20 6c 65 66 |se you'l|l be lef|
|00000c40| 74 20 77 69 74 68 20 74 | 68 65 20 6b 65 79 62 6f |t with t|he keybo|
|00000c50| 61 72 64 20 74 72 61 6e | 73 6c 61 74 69 6f 6e 20 |ard tran|slation |
|00000c60| 69 6e 20 52 41 57 20 6d | 6f 64 65 21 20 4e 6f 74 |in RAW m|ode! Not|
|00000c70| 20 47 6f 6f 64 2e 0a 20 | 2a 20 43 6f 6e 73 69 64 | Good.. |* Consid|
|00000c80| 65 72 20 73 65 74 74 69 | 6e 67 20 75 70 20 61 20 |er setti|ng up a |
|00000c90| 53 49 47 53 45 47 56 20 | 68 61 6e 64 6c 65 72 20 |SIGSEGV |handler |
|00000ca0| 74 68 61 74 20 63 61 6c | 6c 73 20 69 74 2c 20 65 |that cal|ls it, e|
|00000cb0| 74 63 2e 20 6a 75 73 74 | 20 69 6e 20 63 61 73 65 |tc. just| in case|
|00000cc0| 2e 0a 20 2a 2f 0a 0a 65 | 78 74 65 72 6e 20 69 6e |.. */..e|xtern in|
|00000cd0| 74 20 72 61 77 6d 6f 64 | 65 5f 69 6e 69 74 28 29 |t rawmod|e_init()|
|00000ce0| 3b 09 09 2f 2a 20 63 61 | 6c 6c 20 74 68 69 73 20 |;../* ca|ll this |
|00000cf0| 74 6f 20 73 74 61 72 74 | 20 2a 2f 0a 65 78 74 65 |to start| */.exte|
|00000d00| 72 6e 20 76 6f 69 64 20 | 72 61 77 6d 6f 64 65 5f |rn void |rawmode_|
|00000d10| 65 78 69 74 28 29 3b 09 | 09 2f 2a 20 63 61 6c 6c |exit();.|./* call|
|00000d20| 20 74 68 69 73 20 74 6f | 20 65 6e 64 20 2a 2f 0a | this to| end */.|
|00000d30| 0a 65 78 74 65 72 6e 20 | 69 6e 74 20 69 73 5f 6b |.extern |int is_k|
|00000d40| 65 79 5f 70 72 65 73 73 | 65 64 28 69 6e 74 20 73 |ey_press|ed(int s|
|00000d50| 63 29 3b 0a 65 78 74 65 | 72 6e 20 76 6f 69 64 20 |c);.exte|rn void |
|00000d60| 73 63 61 6e 5f 6b 65 79 | 62 6f 61 72 64 28 29 3b |scan_key|board();|
|00000d70| 0a 0a 65 78 74 65 72 6e | 20 69 6e 74 20 67 65 74 |..extern| int get|
|00000d80| 5f 73 63 61 6e 63 6f 64 | 65 28 29 3b 09 2f 2a 20 |_scancod|e();./* |
|00000d90| 72 65 74 75 72 6e 73 20 | 73 63 61 6e 63 6f 64 65 |returns |scancode|
|00000da0| 20 6f 72 20 2d 31 20 69 | 66 20 6e 6f 20 6b 65 79 | or -1 i|f no key|
|00000db0| 20 70 72 65 73 73 65 64 | 20 2a 2f 0a 65 78 74 65 | pressed| */.exte|
|00000dc0| 72 6e 20 69 6e 74 20 6b | 65 79 6d 61 70 5f 74 72 |rn int k|eymap_tr|
|00000dd0| 61 6e 73 28 69 6e 74 20 | 73 63 29 3b 20 2f 2a 20 |ans(int |sc); /* |
|00000de0| 65 66 66 65 63 74 69 76 | 65 6c 79 20 74 72 61 6e |effectiv|ely tran|
|00000df0| 73 6c 61 74 65 73 20 73 | 63 61 6e 63 6f 64 65 20 |slates s|cancode |
|00000e00| 74 6f 20 41 53 43 49 49 | 20 2a 2f 0a 65 78 74 65 |to ASCII| */.exte|
|00000e10| 72 6e 20 69 6e 74 20 73 | 63 61 6e 63 6f 64 65 5f |rn int s|cancode_|
|00000e20| 74 72 61 6e 73 28 69 6e | 74 20 61 73 63 29 3b 20 |trans(in|t asc); |
|00000e30| 2f 2a 20 65 66 66 65 63 | 74 69 76 65 6c 79 20 78 |/* effec|tively x|
|00000e40| 6c 61 74 65 73 20 41 53 | 43 49 49 20 74 6f 20 73 |lates AS|CII to s|
|00000e50| 63 61 6e 63 6f 64 65 20 | 2a 2f 0a 0a 2f 2a 20 63 |cancode |*/../* c|
|00000e60| 61 6c 6c 20 6c 69 6b 65 | 3a 20 73 65 74 5f 73 77 |all like|: set_sw|
|00000e70| 69 74 63 68 5f 66 75 6e | 63 74 69 6f 6e 73 28 75 |itch_fun|ctions(u|
|00000e80| 6e 64 72 61 77 66 75 6e | 63 2c 72 65 64 72 61 77 |ndrawfun|c,redraw|
|00000e90| 66 75 6e 63 29 3b 0a 20 | 2a 20 77 68 65 72 65 20 |func);. |* where |
|00000ea0| 75 6e 64 72 61 77 66 75 | 6e 63 28 29 20 70 75 74 |undrawfu|nc() put|
|00000eb0| 73 20 74 68 65 20 73 63 | 72 65 65 6e 20 69 6e 20 |s the sc|reen in |
|00000ec0| 74 65 78 74 20 6d 6f 64 | 65 2c 20 61 6e 64 0a 20 |text mod|e, and. |
|00000ed0| 2a 20 20 20 20 20 20 20 | 72 65 64 72 61 77 66 75 |* |redrawfu|
|00000ee0| 6e 63 28 29 20 67 6f 65 | 73 20 62 61 63 6b 20 74 |nc() goe|s back t|
|00000ef0| 6f 20 67 72 61 70 68 69 | 63 73 20 61 6e 64 20 72 |o graphi|cs and r|
|00000f00| 65 64 72 61 77 73 20 74 | 68 65 20 73 63 72 65 65 |edraws t|he scree|
|00000f10| 6e 2e 0a 20 2a 20 61 66 | 74 65 72 20 74 68 65 20 |n.. * af|ter the |
|00000f20| 61 62 6f 76 65 20 63 61 | 6c 6c 2c 20 79 6f 75 20 |above ca|ll, you |
|00000f30| 63 61 6e 20 64 6f 20 61 | 6c 6c 6f 77 5f 73 77 69 |can do a|llow_swi|
|00000f40| 74 63 68 28 31 29 3b 20 | 74 6f 20 65 6e 61 62 6c |tch(1); |to enabl|
|00000f50| 65 0a 20 2a 20 56 43 20 | 73 77 69 74 63 68 69 6e |e. * VC |switchin|
|00000f60| 67 2e 0a 20 2a 2f 0a 65 | 78 74 65 72 6e 20 76 6f |g.. */.e|xtern vo|
|00000f70| 69 64 20 73 65 74 5f 73 | 77 69 74 63 68 5f 66 75 |id set_s|witch_fu|
|00000f80| 6e 63 74 69 6f 6e 73 28 | 76 6f 69 64 20 28 2a 6f |nctions(|void (*o|
|00000f90| 66 66 29 28 76 6f 69 64 | 29 2c 76 6f 69 64 20 28 |ff)(void|),void (|
|00000fa0| 2a 6f 6e 29 28 76 6f 69 | 64 29 29 3b 0a 65 78 74 |*on)(voi|d));.ext|
|00000fb0| 65 72 6e 20 76 6f 69 64 | 20 61 6c 6c 6f 77 5f 73 |ern void| allow_s|
|00000fc0| 77 69 74 63 68 28 69 6e | 74 20 6f 6e 29 3b 20 2f |witch(in|t on); /|
|00000fd0| 2a 20 61 6c 6c 6f 77 20 | 56 54 20 73 77 69 74 63 |* allow |VT switc|
|00000fe0| 68 20 69 66 20 6f 6e 3d | 31 20 2a 2f 0a 00 00 00 |h if on=|1 */....|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 72 61 77 6b 65 79 2f 72 | 61 77 6b 65 79 2e 63 00 |rawkey/r|awkey.c.|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00001070| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00001080| 20 20 31 31 32 31 32 20 | 20 35 36 35 32 36 31 30 | 11212 | 5652610|
|00001090| 37 32 36 20 20 31 32 31 | 33 31 00 20 30 00 00 00 |726 121|31. 0...|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 2f 2a 20 6c 69 62 72 61 | 77 6b 65 79 20 76 30 2e |/* libra|wkey v0.|
|00001210| 32 20 2d 20 28 63 29 20 | 31 39 39 34 20 52 75 73 |2 - (c) |1994 Rus|
|00001220| 73 65 6c 6c 20 4d 61 72 | 6b 73 0a 20 2a 20 54 68 |sell Mar|ks. * Th|
|00001230| 69 73 20 6c 69 62 72 61 | 72 79 20 6d 61 79 20 62 |is libra|ry may b|
|00001240| 65 20 66 72 65 65 6c 79 | 20 75 73 65 64 2f 63 6f |e freely| used/co|
|00001250| 70 69 65 64 2f 6d 6f 64 | 69 66 69 65 64 20 70 72 |pied/mod|ified pr|
|00001260| 6f 76 69 64 65 64 20 74 | 68 69 73 20 63 6f 70 79 |ovided t|his copy|
|00001270| 72 69 67 68 74 0a 20 2a | 20 6e 6f 74 69 63 65 20 |right. *| notice |
|00001280| 69 73 20 6c 65 66 74 20 | 69 6e 74 61 63 74 2e 0a |is left |intact..|
|00001290| 20 2a 0a 20 2a 20 6e 65 | 65 64 73 20 6b 65 79 6d | *. * ne|eds keym|
|000012a0| 61 70 20 73 75 70 70 6f | 72 74 20 69 6e 20 6b 65 |ap suppo|rt in ke|
|000012b0| 72 6e 65 6c 20 2d 20 62 | 65 65 6e 20 74 68 65 72 |rnel - b|een ther|
|000012c0| 65 20 73 69 6e 63 65 20 | 30 2e 39 39 70 6c 31 32 |e since |0.99pl12|
|000012d0| 20 49 20 74 68 69 6e 6b | 2e 0a 20 2a 2f 0a 0a 23 | I think|.. */..#|
|000012e0| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|000012f0| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 66 63 6e 74 |>.#inclu|de <fcnt|
|00001300| 6c 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 75 |l.h>.#in|clude <u|
|00001310| 6e 69 73 74 64 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |nistd.h>|.#includ|
|00001320| 65 20 3c 73 69 67 6e 61 | 6c 2e 68 3e 0a 23 69 6e |e <signa|l.h>.#in|
|00001330| 63 6c 75 64 65 20 3c 74 | 65 72 6d 69 6f 73 2e 68 |clude <t|ermios.h|
|00001340| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |>.#inclu|de <sys/|
|00001350| 69 6f 63 74 6c 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ioctl.h>|.#includ|
|00001360| 65 20 3c 6c 69 6e 75 78 | 2f 6b 64 2e 68 3e 09 09 |e <linux|/kd.h>..|
|00001370| 2f 2a 20 52 41 57 20 6d | 6f 64 65 20 73 74 75 66 |/* RAW m|ode stuf|
|00001380| 66 2c 20 65 74 63 2e 20 | 2a 2f 0a 23 69 6e 63 6c |f, etc. |*/.#incl|
|00001390| 75 64 65 20 3c 6c 69 6e | 75 78 2f 6b 65 79 62 6f |ude <lin|ux/keybo|
|000013a0| 61 72 64 2e 68 3e 09 2f | 2a 20 6d 61 69 6e 6c 79 |ard.h>./|* mainly|
|000013b0| 20 66 6f 72 20 4e 52 5f | 4b 45 59 53 20 2a 2f 0a | for NR_|KEYS */.|
|000013c0| 23 69 6e 63 6c 75 64 65 | 20 3c 6c 69 6e 75 78 2f |#include| <linux/|
|000013d0| 76 74 2e 68 3e 09 09 2f | 2a 20 66 6f 72 20 56 54 |vt.h>../|* for VT|
|000013e0| 20 73 74 75 66 66 20 2d | 20 6e 61 68 2c 20 72 65 | stuff -| nah, re|
|000013f0| 61 6c 6c 79 3f 20 3a 29 | 20 2a 2f 0a 23 69 6e 63 |ally? :)| */.#inc|
|00001400| 6c 75 64 65 20 22 72 61 | 77 6b 65 79 2e 68 22 0a |lude "ra|wkey.h".|
|00001410| 0a 0a 73 74 61 74 69 63 | 20 69 6e 74 20 6b 65 79 |..static| int key|
|00001420| 6d 61 70 5b 4e 52 5f 4b | 45 59 53 5d 3b 09 2f 2a |map[NR_K|EYS];./*|
|00001430| 20 73 63 61 6e 63 6f 64 | 65 20 2d 3e 20 41 53 43 | scancod|e -> ASC|
|00001440| 49 49 20 74 72 61 6e 73 | 6c 61 74 69 6f 6e 20 2a |II trans|lation *|
|00001450| 2f 0a 73 74 61 74 69 63 | 20 69 6e 74 20 61 73 63 |/.static| int asc|
|00001460| 69 69 6d 61 70 5b 32 35 | 36 5d 3b 09 2f 2a 20 41 |iimap[25|6];./* A|
|00001470| 53 43 49 49 20 2d 3e 20 | 73 63 61 6e 63 6f 64 65 |SCII -> |scancode|
|00001480| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 20 2a 2f 0a | transla|tion */.|
|00001490| 73 74 61 74 69 63 20 69 | 6e 74 20 74 74 79 5f 66 |static i|nt tty_f|
|000014a0| 64 3d 2d 31 2c 72 65 73 | 74 61 72 74 5f 63 6f 6e |d=-1,res|tart_con|
|000014b0| 3d 30 2c 61 6c 74 5f 70 | 72 65 73 73 65 64 3d 30 |=0,alt_p|ressed=0|
|000014c0| 3b 0a 73 74 61 74 69 63 | 20 73 74 72 75 63 74 20 |;.static| struct |
|000014d0| 74 65 72 6d 69 6f 73 20 | 6e 65 77 5f 74 65 72 6d |termios |new_term|
|000014e0| 69 6f 2c 6f 6c 64 5f 74 | 65 72 6d 69 6f 3b 0a 73 |io,old_t|ermio;.s|
|000014f0| 74 61 74 69 63 20 69 6e | 74 20 76 74 73 77 69 74 |tatic in|t vtswit|
|00001500| 63 68 5f 61 6c 6c 6f 77 | 65 64 3d 30 3b 0a 0a 73 |ch_allow|ed=0;..s|
|00001510| 74 61 74 69 63 20 69 6e | 74 20 6b 65 79 5f 64 6f |tatic in|t key_do|
|00001520| 77 6e 5b 31 32 38 5d 3b | 0a 0a 2f 2a 20 75 73 65 |wn[128];|../* use|
|00001530| 72 2d 73 75 70 70 6c 69 | 65 64 20 66 75 6e 63 74 |r-suppli|ed funct|
|00001540| 69 6f 6e 73 20 74 6f 20 | 27 75 6e 64 72 61 77 27 |ions to |'undraw'|
|00001550| 20 61 6e 64 20 27 72 65 | 64 72 61 77 27 20 73 63 | and 're|draw' sc|
|00001560| 72 65 65 6e 0a 20 2a 20 | 69 66 20 76 74 20 73 77 |reen. * |if vt sw|
|00001570| 69 74 63 68 69 6e 67 20 | 69 73 20 61 6c 6c 6f 77 |itching |is allow|
|00001580| 65 64 2e 0a 20 2a 2f 0a | 76 6f 69 64 20 28 2a 75 |ed.. */.|void (*u|
|00001590| 73 65 72 6d 6f 64 65 6f | 6e 29 28 76 6f 69 64 29 |sermodeo|n)(void)|
|000015a0| 3d 4e 55 4c 4c 3b 0a 76 | 6f 69 64 20 28 2a 75 73 |=NULL;.v|oid (*us|
|000015b0| 65 72 6d 6f 64 65 6f 66 | 66 29 28 76 6f 69 64 29 |ermodeof|f)(void)|
|000015c0| 3d 4e 55 4c 4c 3b 0a 0a | 0a 2f 2a 20 69 74 27 73 |=NULL;..|./* it's|
|000015d0| 20 72 65 61 6c 6c 79 20 | 65 61 73 79 20 74 6f 20 | really |easy to |
|000015e0| 74 72 61 6e 73 6c 61 74 | 65 20 74 68 65 20 73 63 |translat|e the sc|
|000015f0| 61 6e 63 6f 64 65 73 20 | 74 68 65 73 65 20 64 61 |ancodes |these da|
|00001600| 79 73 2c 20 77 65 20 6a | 75 73 74 0a 20 2a 20 75 |ys, we j|ust. * u|
|00001610| 73 65 20 74 68 65 20 6b | 65 79 74 61 62 6c 65 20 |se the k|eytable |
|00001620| 73 74 75 66 66 21 0a 20 | 2a 0a 20 2a 20 72 65 74 |stuff!. |*. * ret|
|00001630| 75 72 6e 73 20 30 20 6f | 6e 20 65 72 72 6f 72 2c |urns 0 o|n error,|
|00001640| 20 31 20 69 66 20 6f 6b | 0a 20 2a 2f 0a 69 6e 74 | 1 if ok|. */.int|
|00001650| 20 67 65 74 5f 6b 65 79 | 62 5f 6d 61 70 28 29 0a | get_key|b_map().|
|00001660| 7b 0a 73 74 72 75 63 74 | 20 6b 62 65 6e 74 72 79 |{.struct| kbentry|
|00001670| 20 6b 65 79 62 5f 65 6e | 74 3b 0a 69 6e 74 20 66 | keyb_en|t;.int f|
|00001680| 3b 0a 0a 6b 65 79 62 5f | 65 6e 74 2e 6b 62 5f 74 |;..keyb_|ent.kb_t|
|00001690| 61 62 6c 65 3d 30 3b 09 | 2f 2a 20 75 6e 73 68 69 |able=0;.|/* unshi|
|000016a0| 66 74 65 64 20 2a 2f 0a | 66 6f 72 28 66 3d 30 3b |fted */.|for(f=0;|
|000016b0| 66 3c 4e 52 5f 4b 45 59 | 53 3b 66 2b 2b 29 0a 20 |f<NR_KEY|S;f++). |
|000016c0| 20 7b 0a 20 20 6b 65 79 | 62 5f 65 6e 74 2e 6b 62 | {. key|b_ent.kb|
|000016d0| 5f 69 6e 64 65 78 3d 66 | 3b 0a 20 20 0a 20 20 69 |_index=f|;. . i|
|000016e0| 66 28 69 6f 63 74 6c 28 | 74 74 79 5f 66 64 2c 4b |f(ioctl(|tty_fd,K|
|000016f0| 44 47 4b 42 45 4e 54 2c | 28 75 6e 73 69 67 6e 65 |DGKBENT,|(unsigne|
|00001700| 64 20 69 6e 74 29 26 6b | 65 79 62 5f 65 6e 74 29 |d int)&k|eyb_ent)|
|00001710| 29 0a 20 20 20 20 72 65 | 74 75 72 6e 28 30 29 3b |). re|turn(0);|
|00001720| 0a 20 20 20 20 0a 20 20 | 6b 65 79 6d 61 70 5b 66 |. . |keymap[f|
|00001730| 5d 3d 6b 65 79 62 5f 65 | 6e 74 2e 6b 62 5f 76 61 |]=keyb_e|nt.kb_va|
|00001740| 6c 75 65 3b 0a 20 20 7d | 0a 72 65 74 75 72 6e 28 |lue;. }|.return(|
|00001750| 31 29 3b 0a 7d 0a 0a 0a | 76 6f 69 64 20 6d 61 6b |1);.}...|void mak|
|00001760| 65 5f 61 73 63 69 69 5f | 6d 61 70 28 29 0a 7b 0a |e_ascii_|map().{.|
|00001770| 69 6e 74 20 66 2c 69 2c | 66 6f 75 6e 64 3b 0a 0a |int f,i,|found;..|
|00001780| 66 6f 72 28 66 3d 30 3b | 66 3c 32 35 36 3b 66 2b |for(f=0;|f<256;f+|
|00001790| 2b 29 0a 20 20 7b 0a 20 | 20 66 6f 75 6e 64 3d 30 |+). {. | found=0|
|000017a0| 3b 0a 20 20 66 6f 72 28 | 69 3d 30 3b 69 3c 4e 52 |;. for(|i=0;i<NR|
|000017b0| 5f 4b 45 59 53 3b 69 2b | 2b 29 0a 20 20 20 20 69 |_KEYS;i+|+). i|
|000017c0| 66 28 28 4b 54 59 50 28 | 6b 65 79 6d 61 70 5b 69 |f((KTYP(|keymap[i|
|000017d0| 5d 29 3d 3d 4b 54 5f 4c | 41 54 49 4e 20 7c 7c 20 |])==KT_L|ATIN || |
|000017e0| 4b 54 59 50 28 6b 65 79 | 6d 61 70 5b 69 5d 29 3d |KTYP(key|map[i])=|
|000017f0| 3d 4b 54 5f 4c 45 54 54 | 45 52 20 7c 7c 0a 20 20 |=KT_LETT|ER ||. |
|00001800| 20 20 20 20 20 20 4b 54 | 59 50 28 6b 65 79 6d 61 | KT|YP(keyma|
|00001810| 70 5b 69 5d 29 3d 3d 4b | 54 5f 41 53 43 49 49 29 |p[i])==K|T_ASCII)|
|00001820| 20 26 26 20 4b 56 41 4c | 28 6b 65 79 6d 61 70 5b | && KVAL|(keymap[|
|00001830| 69 5d 29 3d 3d 66 29 0a | 20 20 20 20 20 20 7b 0a |i])==f).| {.|
|00001840| 20 20 20 20 20 20 66 6f | 75 6e 64 3d 31 3b 0a 20 | fo|und=1;. |
|00001850| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00001860| 20 20 7d 0a 20 20 20 20 | 20 20 0a 20 20 61 73 63 | }. | . asc|
|00001870| 69 69 6d 61 70 5b 66 5d | 3d 66 6f 75 6e 64 3f 69 |iimap[f]|=found?i|
|00001880| 3a 2d 31 3b 0a 20 20 7d | 0a 7d 0a 0a 0a 76 6f 69 |:-1;. }|.}...voi|
|00001890| 64 20 61 6c 6c 6f 77 5f | 73 77 69 74 63 68 28 6f |d allow_|switch(o|
|000018a0| 6e 29 0a 69 6e 74 20 6f | 6e 3b 0a 7b 0a 76 74 73 |n).int o|n;.{.vts|
|000018b0| 77 69 74 63 68 5f 61 6c | 6c 6f 77 65 64 3d 6f 6e |witch_al|lowed=on|
|000018c0| 3b 0a 7d 0a 0a 0a 76 6f | 69 64 20 73 65 74 5f 73 |;.}...vo|id set_s|
|000018d0| 77 69 74 63 68 5f 66 75 | 6e 63 74 69 6f 6e 73 28 |witch_fu|nctions(|
|000018e0| 6f 66 66 2c 6f 6e 29 0a | 76 6f 69 64 20 28 2a 6f |off,on).|void (*o|
|000018f0| 66 66 29 28 76 6f 69 64 | 29 3b 0a 76 6f 69 64 20 |ff)(void|);.void |
|00001900| 28 2a 6f 6e 29 28 76 6f | 69 64 29 3b 0a 7b 0a 75 |(*on)(vo|id);.{.u|
|00001910| 73 65 72 6d 6f 64 65 6f | 66 66 3d 6f 66 66 3b 0a |sermodeo|ff=off;.|
|00001920| 75 73 65 72 6d 6f 64 65 | 6f 6e 3d 6f 6e 3b 0a 7d |usermode|on=on;.}|
|00001930| 0a 0a 0a 76 6f 69 64 20 | 72 61 77 5f 6d 6f 64 65 |...void |raw_mode|
|00001940| 28 74 74 79 5f 66 64 2c | 6f 6e 29 0a 69 6e 74 20 |(tty_fd,|on).int |
|00001950| 74 74 79 5f 66 64 2c 6f | 6e 3b 0a 7b 0a 69 6f 63 |tty_fd,o|n;.{.ioc|
|00001960| 74 6c 28 74 74 79 5f 66 | 64 2c 4b 44 53 4b 42 4d |tl(tty_f|d,KDSKBM|
|00001970| 4f 44 45 2c 6f 6e 3f 4b | 5f 52 41 57 3a 4b 5f 58 |ODE,on?K|_RAW:K_X|
|00001980| 4c 41 54 45 29 3b 0a 7d | 0a 0a 0a 76 6f 69 64 20 |LATE);.}|...void |
|00001990| 62 6c 61 6e 6b 5f 6b 65 | 79 5f 64 6f 77 6e 28 29 |blank_ke|y_down()|
|000019a0| 0a 7b 0a 69 6e 74 20 66 | 3b 0a 0a 66 6f 72 28 66 |.{.int f|;..for(f|
|000019b0| 3d 30 3b 66 3c 4e 52 5f | 4b 45 59 53 3b 66 2b 2b |=0;f<NR_|KEYS;f++|
|000019c0| 29 0a 20 20 6b 65 79 5f | 64 6f 77 6e 5b 66 5d 3d |). key_|down[f]=|
|000019d0| 30 3b 0a 7d 0a 0a 0a 76 | 6f 69 64 20 76 74 5f 66 |0;.}...v|oid vt_f|
|000019e0| 72 6f 6d 5f 68 65 72 65 | 28 29 0a 7b 0a 69 6f 63 |rom_here|().{.ioc|
|000019f0| 74 6c 28 74 74 79 5f 66 | 64 2c 54 43 53 45 54 53 |tl(tty_f|d,TCSETS|
|00001a00| 57 2c 26 6f 6c 64 5f 74 | 65 72 6d 69 6f 29 3b 0a |W,&old_t|ermio);.|
|00001a10| 75 73 65 72 6d 6f 64 65 | 6f 66 66 28 29 3b 0a 72 |usermode|off();.r|
|00001a20| 61 77 5f 6d 6f 64 65 28 | 74 74 79 5f 66 64 2c 30 |aw_mode(|tty_fd,0|
|00001a30| 29 3b 20 20 2f 2a 20 64 | 6f 6e 27 74 20 75 73 65 |); /* d|on't use|
|00001a40| 20 72 61 77 6d 6f 64 65 | 5f 65 78 69 74 20 27 63 | rawmode|_exit 'c|
|00001a50| 6f 73 20 6f 66 20 6f 74 | 68 65 72 20 74 68 69 6e |os of ot|her thin|
|00001a60| 67 73 20 69 74 20 64 6f | 65 73 20 2a 2f 0a 69 6f |gs it do|es */.io|
|00001a70| 63 74 6c 28 74 74 79 5f | 66 64 2c 56 54 5f 52 45 |ctl(tty_|fd,VT_RE|
|00001a80| 4c 44 49 53 50 2c 56 54 | 5f 41 43 4b 41 43 51 29 |LDISP,VT|_ACKACQ)|
|00001a90| 3b 0a 73 69 67 6e 61 6c | 28 53 49 47 55 53 52 31 |;.signal|(SIGUSR1|
|00001aa0| 2c 76 74 5f 66 72 6f 6d | 5f 68 65 72 65 29 3b 0a |,vt_from|_here);.|
|00001ab0| 7d 0a 0a 0a 76 6f 69 64 | 20 76 74 5f 74 6f 5f 68 |}...void| vt_to_h|
|00001ac0| 65 72 65 28 29 0a 7b 0a | 75 73 65 72 6d 6f 64 65 |ere().{.|usermode|
|00001ad0| 6f 6e 28 29 3b 0a 72 65 | 73 74 61 72 74 5f 63 6f |on();.re|start_co|
|00001ae0| 6e 3d 31 3b 09 09 2f 2a | 20 77 65 27 72 65 20 62 |n=1;../*| we're b|
|00001af0| 61 63 6b 2c 20 73 61 79 | 20 74 6f 20 73 74 61 72 |ack, say| to star|
|00001b00| 74 20 75 70 20 61 67 61 | 69 6e 20 2a 2f 0a 61 6c |t up aga|in */.al|
|00001b10| 74 5f 70 72 65 73 73 65 | 64 3d 30 3b 0a 72 61 77 |t_presse|d=0;.raw|
|00001b20| 5f 6d 6f 64 65 28 74 74 | 79 5f 66 64 2c 31 29 3b |_mode(tt|y_fd,1);|
|00001b30| 0a 73 69 67 6e 61 6c 28 | 53 49 47 55 53 52 32 2c |.signal(|SIGUSR2,|
|00001b40| 76 74 5f 74 6f 5f 68 65 | 72 65 29 3b 0a 7d 0a 0a |vt_to_he|re);.}..|
|00001b50| 0a 2f 2a 20 72 65 74 75 | 72 6e 73 20 31 20 69 66 |./* retu|rns 1 if|
|00001b60| 20 6f 6b 2c 20 30 20 6f | 74 68 65 72 77 69 73 65 | ok, 0 o|therwise|
|00001b70| 20 2a 2f 0a 69 6e 74 20 | 72 61 77 6d 6f 64 65 5f | */.int |rawmode_|
|00001b80| 69 6e 69 74 28 29 0a 7b | 0a 69 66 28 74 74 79 5f |init().{|.if(tty_|
|00001b90| 66 64 3d 3d 2d 31 29 0a | 20 20 7b 0a 20 20 74 74 |fd==-1).| {. tt|
|00001ba0| 79 5f 66 64 3d 66 69 6c | 65 6e 6f 28 73 74 64 69 |y_fd=fil|eno(stdi|
|00001bb0| 6e 29 3b 0a 20 20 66 63 | 6e 74 6c 28 74 74 79 5f |n);. fc|ntl(tty_|
|00001bc0| 66 64 2c 46 5f 53 45 54 | 46 4c 2c 4f 5f 4e 4f 4e |fd,F_SET|FL,O_NON|
|00001bd0| 42 4c 4f 43 4b 29 3b 0a | 20 20 7d 0a 0a 2f 2a 20 |BLOCK);.| }../* |
|00001be0| 66 69 78 20 74 65 72 6d | 69 6f 20 73 74 75 66 66 |fix term|io stuff|
|00001bf0| 20 73 6f 20 5e 43 2d 73 | 74 79 6c 65 20 69 6e 74 | so ^C-s|tyle int|
|00001c00| 65 72 72 75 70 74 73 20 | 61 72 65 20 69 67 6e 6f |errupts |are igno|
|00001c10| 72 65 64 20 2a 2f 0a 69 | 6f 63 74 6c 28 74 74 79 |red */.i|octl(tty|
|00001c20| 5f 66 64 2c 54 43 47 45 | 54 53 2c 26 6f 6c 64 5f |_fd,TCGE|TS,&old_|
|00001c30| 74 65 72 6d 69 6f 29 3b | 0a 6e 65 77 5f 74 65 72 |termio);|.new_ter|
|00001c40| 6d 69 6f 3d 6f 6c 64 5f | 74 65 72 6d 69 6f 3b 0a |mio=old_|termio;.|
|00001c50| 6e 65 77 5f 74 65 72 6d | 69 6f 2e 63 5f 6c 66 6c |new_term|io.c_lfl|
|00001c60| 61 67 26 3d 7e 28 49 53 | 49 47 7c 49 43 41 4e 4f |ag&=~(IS|IG|ICANO|
|00001c70| 4e 29 3b 0a 69 6f 63 74 | 6c 28 74 74 79 5f 66 64 |N);.ioct|l(tty_fd|
|00001c80| 2c 54 43 53 45 54 53 57 | 2c 26 6e 65 77 5f 74 65 |,TCSETSW|,&new_te|
|00001c90| 72 6d 69 6f 29 3b 0a 0a | 69 66 28 67 65 74 5f 6b |rmio);..|if(get_k|
|00001ca0| 65 79 62 5f 6d 61 70 28 | 74 74 79 5f 66 64 2c 6b |eyb_map(|tty_fd,k|
|00001cb0| 65 79 6d 61 70 29 29 0a | 20 20 7b 0a 20 20 73 74 |eymap)).| {. st|
|00001cc0| 72 75 63 74 20 76 74 5f | 6d 6f 64 65 20 76 74 6d |ruct vt_|mode vtm|
|00001cd0| 3b 0a 20 20 20 20 0a 20 | 20 6d 61 6b 65 5f 61 73 |;. . | make_as|
|00001ce0| 63 69 69 5f 6d 61 70 28 | 29 3b 0a 20 20 62 6c 61 |cii_map(|);. bla|
|00001cf0| 6e 6b 5f 6b 65 79 5f 64 | 6f 77 6e 28 29 3b 0a 20 |nk_key_d|own();. |
|00001d00| 20 72 61 77 5f 6d 6f 64 | 65 28 74 74 79 5f 66 64 | raw_mod|e(tty_fd|
|00001d10| 2c 31 29 3b 0a 20 20 73 | 69 67 6e 61 6c 28 53 49 |,1);. s|ignal(SI|
|00001d20| 47 55 53 52 31 2c 76 74 | 5f 66 72 6f 6d 5f 68 65 |GUSR1,vt|_from_he|
|00001d30| 72 65 29 3b 0a 20 20 73 | 69 67 6e 61 6c 28 53 49 |re);. s|ignal(SI|
|00001d40| 47 55 53 52 32 2c 76 74 | 5f 74 6f 5f 68 65 72 65 |GUSR2,vt|_to_here|
|00001d50| 29 3b 0a 20 20 69 6f 63 | 74 6c 28 74 74 79 5f 66 |);. ioc|tl(tty_f|
|00001d60| 64 2c 56 54 5f 47 45 54 | 4d 4f 44 45 2c 26 76 74 |d,VT_GET|MODE,&vt|
|00001d70| 6d 29 3b 0a 20 20 76 74 | 6d 2e 6d 6f 64 65 3d 56 |m);. vt|m.mode=V|
|00001d80| 54 5f 50 52 4f 43 45 53 | 53 3b 0a 20 20 76 74 6d |T_PROCES|S;. vtm|
|00001d90| 2e 72 65 6c 73 69 67 3d | 53 49 47 55 53 52 31 3b |.relsig=|SIGUSR1;|
|00001da0| 0a 20 20 76 74 6d 2e 61 | 63 71 73 69 67 3d 53 49 |. vtm.a|cqsig=SI|
|00001db0| 47 55 53 52 32 3b 0a 20 | 20 69 6f 63 74 6c 28 74 |GUSR2;. | ioctl(t|
|00001dc0| 74 79 5f 66 64 2c 56 54 | 5f 53 45 54 4d 4f 44 45 |ty_fd,VT|_SETMODE|
|00001dd0| 2c 26 76 74 6d 29 3b 0a | 20 20 0a 20 20 72 65 74 |,&vtm);.| . ret|
|00001de0| 75 72 6e 28 31 29 3b 0a | 20 20 7d 0a 65 6c 73 65 |urn(1);.| }.else|
|00001df0| 0a 20 20 72 65 74 75 72 | 6e 28 30 29 3b 0a 7d 0a |. retur|n(0);.}.|
|00001e00| 0a 0a 76 6f 69 64 20 72 | 61 77 6d 6f 64 65 5f 65 |..void r|awmode_e|
|00001e10| 78 69 74 28 29 0a 7b 0a | 73 74 72 75 63 74 20 76 |xit().{.|struct v|
|00001e20| 74 5f 6d 6f 64 65 20 76 | 74 6d 3b 0a 0a 69 6f 63 |t_mode v|tm;..ioc|
|00001e30| 74 6c 28 74 74 79 5f 66 | 64 2c 56 54 5f 47 45 54 |tl(tty_f|d,VT_GET|
|00001e40| 4d 4f 44 45 2c 26 76 74 | 6d 29 3b 0a 76 74 6d 2e |MODE,&vt|m);.vtm.|
|00001e50| 6d 6f 64 65 3d 56 54 5f | 41 55 54 4f 3b 0a 69 6f |mode=VT_|AUTO;.io|
|00001e60| 63 74 6c 28 74 74 79 5f | 66 64 2c 56 54 5f 53 45 |ctl(tty_|fd,VT_SE|
|00001e70| 54 4d 4f 44 45 2c 26 76 | 74 6d 29 3b 0a 69 6f 63 |TMODE,&v|tm);.ioc|
|00001e80| 74 6c 28 74 74 79 5f 66 | 64 2c 54 43 53 45 54 53 |tl(tty_f|d,TCSETS|
|00001e90| 57 2c 26 6f 6c 64 5f 74 | 65 72 6d 69 6f 29 3b 0a |W,&old_t|ermio);.|
|00001ea0| 72 61 77 5f 6d 6f 64 65 | 28 74 74 79 5f 66 64 2c |raw_mode|(tty_fd,|
|00001eb0| 30 29 3b 0a 74 74 79 5f | 66 64 3d 2d 31 3b 0a 7d |0);.tty_|fd=-1;.}|
|00001ec0| 0a 0a 0a 2f 2a 20 72 65 | 74 75 72 6e 73 20 2d 31 |.../* re|turns -1|
|00001ed0| 20 69 66 20 6e 6f 20 6b | 65 79 70 72 65 73 73 65 | if no k|eypresse|
|00001ee0| 73 20 70 65 6e 64 69 6e | 67 2c 20 65 6c 73 65 20 |s pendin|g, else |
|00001ef0| 72 65 74 75 72 6e 73 20 | 73 63 61 6e 63 6f 64 65 |returns |scancode|
|00001f00| 2e 20 2a 2f 0a 69 6e 74 | 20 67 65 74 5f 73 63 61 |. */.int| get_sca|
|00001f10| 6e 63 6f 64 65 28 29 0a | 7b 0a 75 6e 73 69 67 6e |ncode().|{.unsign|
|00001f20| 65 64 20 63 68 61 72 20 | 63 3b 0a 0a 69 66 28 72 |ed char |c;..if(r|
|00001f30| 65 61 64 28 74 74 79 5f | 66 64 2c 26 63 2c 31 29 |ead(tty_|fd,&c,1)|
|00001f40| 3c 3d 30 29 0a 20 20 72 | 65 74 75 72 6e 28 2d 31 |<=0). r|eturn(-1|
|00001f50| 29 3b 0a 0a 72 65 74 75 | 72 6e 28 28 69 6e 74 29 |);..retu|rn((int)|
|00001f60| 63 29 3b 0a 7d 0a 0a 0a | 69 6e 74 20 69 73 5f 6b |c);.}...|int is_k|
|00001f70| 65 79 5f 70 72 65 73 73 | 65 64 28 73 63 29 0a 69 |ey_press|ed(sc).i|
|00001f80| 6e 74 20 73 63 3b 0a 7b | 0a 69 66 28 73 63 3c 30 |nt sc;.{|.if(sc<0|
|00001f90| 20 7c 7c 20 73 63 3e 31 | 32 37 29 20 72 65 74 75 | || sc>1|27) retu|
|00001fa0| 72 6e 28 30 29 3b 0a 72 | 65 74 75 72 6e 28 6b 65 |rn(0);.r|eturn(ke|
|00001fb0| 79 5f 64 6f 77 6e 5b 73 | 63 5d 3f 31 3a 30 29 3b |y_down[s|c]?1:0);|
|00001fc0| 0a 7d 0a 0a 0a 69 6e 74 | 20 69 73 5f 61 6e 79 5f |.}...int| is_any_|
|00001fd0| 6b 65 79 5f 70 72 65 73 | 73 65 64 28 29 0a 7b 0a |key_pres|sed().{.|
|00001fe0| 69 6e 74 20 66 3b 0a 0a | 66 6f 72 28 66 3d 30 3b |int f;..|for(f=0;|
|00001ff0| 66 3c 31 32 38 3b 66 2b | 2b 29 0a 20 20 69 66 28 |f<128;f+|+). if(|
|00002000| 6b 65 79 5f 64 6f 77 6e | 5b 66 5d 29 20 72 65 74 |key_down|[f]) ret|
|00002010| 75 72 6e 28 31 29 3b 0a | 0a 72 65 74 75 72 6e 28 |urn(1);.|.return(|
|00002020| 30 29 3b 0a 7d 0a 0a 0a | 2f 2a 20 74 68 69 73 20 |0);.}...|/* this |
|00002030| 69 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 20 79 |is the r|outine y|
|00002040| 6f 75 20 73 68 6f 75 6c | 64 20 63 61 6c 6c 20 77 |ou shoul|d call w|
|00002050| 68 65 6e 65 76 65 72 20 | 79 6f 75 20 77 6f 75 6c |henever |you woul|
|00002060| 64 20 6e 6f 72 6d 61 6c | 6c 79 0a 20 2a 20 72 65 |d normal|ly. * re|
|00002070| 61 64 20 61 20 6b 65 79 | 70 72 65 73 73 2e 20 48 |ad a key|press. H|
|00002080| 6f 77 65 76 65 72 2c 20 | 74 6f 20 61 63 74 75 61 |owever, |to actua|
|00002090| 6c 6c 79 20 74 65 6c 6c | 20 69 66 20 61 20 6b 65 |lly tell| if a ke|
|000020a0| 79 20 69 73 20 70 72 65 | 73 73 65 64 2c 0a 20 2a |y is pre|ssed,. *|
|000020b0| 20 63 61 6c 6c 20 69 73 | 5f 6b 65 79 5f 70 72 65 | call is|_key_pre|
|000020c0| 73 73 65 64 28 29 20 77 | 69 74 68 20 61 20 73 63 |ssed() w|ith a sc|
|000020d0| 61 6e 63 6f 64 65 20 61 | 73 20 61 72 67 2e 0a 20 |ancode a|s arg.. |
|000020e0| 2a 2f 0a 76 6f 69 64 20 | 73 63 61 6e 5f 6b 65 79 |*/.void |scan_key|
|000020f0| 62 6f 61 72 64 28 29 0a | 7b 0a 69 6e 74 20 63 2c |board().|{.int c,|
|00002100| 6b 65 79 2c 66 6c 61 67 | 2c 76 74 3b 0a 0a 2f 2a |key,flag|,vt;../*|
|00002110| 20 77 65 20 75 73 65 20 | 42 46 49 20 74 6f 20 66 | we use |BFI to f|
|00002120| 69 78 20 74 68 65 20 50 | 72 74 53 63 2f 50 61 75 |ix the P|rtSc/Pau|
|00002130| 73 65 20 70 72 6f 62 6c | 65 6d 20 2d 20 69 2e 65 |se probl|em - i.e|
|00002140| 2e 20 77 65 20 64 6f 6e | 27 74 20 3a 5e 29 20 2a |. we don|'t :^) *|
|00002150| 2f 0a 77 68 69 6c 65 28 | 28 63 3d 67 65 74 5f 73 |/.while(|(c=get_s|
|00002160| 63 61 6e 63 6f 64 65 28 | 29 29 3d 3d 30 78 45 30 |cancode(|))==0xE0|
|00002170| 29 3b 0a 69 66 28 63 3d | 3d 30 78 45 31 29 20 63 |);.if(c=|=0xE1) c|
|00002180| 3d 67 65 74 5f 73 63 61 | 6e 63 6f 64 65 28 29 3b |=get_sca|ncode();|
|00002190| 0a 0a 69 66 28 63 3d 3d | 2d 31 29 20 72 65 74 75 |..if(c==|-1) retu|
|000021a0| 72 6e 3b 09 2f 2a 20 6e | 6f 20 6b 65 79 20 77 61 |rn;./* n|o key wa|
|000021b0| 73 20 70 72 65 73 73 65 | 64 20 2a 2f 0a 0a 6b 65 |s presse|d */..ke|
|000021c0| 79 3d 63 26 31 32 37 3b | 0a 66 6c 61 67 3d 28 63 |y=c&127;|.flag=(c|
|000021d0| 26 31 32 38 29 3f 30 3a | 31 3b 09 2f 2a 20 31 20 |&128)?0:|1;./* 1 |
|000021e0| 3d 20 64 6f 77 6e 20 2a | 2f 0a 0a 6b 65 79 5f 64 |= down *|/..key_d|
|000021f0| 6f 77 6e 5b 6b 65 79 5d | 3d 66 6c 61 67 3b 0a 0a |own[key]|=flag;..|
|00002200| 69 66 28 6b 65 79 3d 3d | 4c 45 46 54 5f 41 4c 54 |if(key==|LEFT_ALT|
|00002210| 29 20 61 6c 74 5f 70 72 | 65 73 73 65 64 3d 21 66 |) alt_pr|essed=!f|
|00002220| 6c 61 67 3b 0a 0a 69 66 | 28 61 6c 74 5f 70 72 65 |lag;..if|(alt_pre|
|00002230| 73 73 65 64 20 26 26 20 | 63 3e 3d 46 55 4e 43 5f |ssed && |c>=FUNC_|
|00002240| 4b 45 59 28 31 29 20 26 | 26 20 63 3c 3d 46 55 4e |KEY(1) &|& c<=FUN|
|00002250| 43 5f 4b 45 59 28 31 30 | 29 29 0a 20 20 7b 0a 20 |C_KEY(10|)). {. |
|00002260| 20 73 74 72 75 63 74 20 | 76 74 5f 73 74 61 74 20 | struct |vt_stat |
|00002270| 76 74 73 3b 0a 20 20 69 | 6e 74 20 6e 65 77 76 74 |vts;. i|nt newvt|
|00002280| 3b 0a 20 20 0a 20 20 69 | 6f 63 74 6c 28 74 74 79 |;. . i|octl(tty|
|00002290| 5f 66 64 2c 56 54 5f 47 | 45 54 53 54 41 54 45 2c |_fd,VT_G|ETSTATE,|
|000022a0| 26 76 74 73 29 3b 0a 20 | 20 6e 65 77 76 74 3d 63 |&vts);. | newvt=c|
|000022b0| 2d 46 55 4e 43 5f 4b 45 | 59 28 31 29 2b 31 3b 0a |-FUNC_KE|Y(1)+1;.|
|000022c0| 20 20 69 66 28 76 74 73 | 2e 76 5f 61 63 74 69 76 | if(vts|.v_activ|
|000022d0| 65 21 3d 6e 65 77 76 74 | 20 26 26 20 76 74 73 77 |e!=newvt| && vtsw|
|000022e0| 69 74 63 68 5f 61 6c 6c | 6f 77 65 64 20 26 26 0a |itch_all|owed &&.|
|000022f0| 20 20 09 75 73 65 72 6d | 6f 64 65 6f 66 66 21 3d | .userm|odeoff!=|
|00002300| 4e 55 4c 4c 20 26 26 20 | 75 73 65 72 6d 6f 64 65 |NULL && |usermode|
|00002310| 6f 6e 21 3d 4e 55 4c 4c | 29 0a 20 20 20 20 7b 0a |on!=NULL|). {.|
|00002320| 20 20 20 20 69 6f 63 74 | 6c 28 74 74 79 5f 66 64 | ioct|l(tty_fd|
|00002330| 2c 56 54 5f 41 43 54 49 | 56 41 54 45 2c 6e 65 77 |,VT_ACTI|VATE,new|
|00002340| 76 74 29 3b 0a 20 20 20 | 20 72 65 73 74 61 72 74 |vt);. | restart|
|00002350| 5f 63 6f 6e 3d 30 3b 0a | 20 20 20 20 77 68 69 6c |_con=0;.| whil|
|00002360| 65 28 72 65 73 74 61 72 | 74 5f 63 6f 6e 3d 3d 30 |e(restar|t_con==0|
|00002370| 29 20 75 73 6c 65 65 70 | 28 35 30 30 30 30 29 3b |) usleep|(50000);|
|00002380| 0a 20 20 20 20 7d 0a 20 | 20 7d 0a 7d 0a 0a 0a 2f |. }. | }.}.../|
|00002390| 2a 20 63 6f 6e 76 65 72 | 74 73 20 73 63 61 6e 63 |* conver|ts scanc|
|000023a0| 6f 64 65 20 74 6f 20 6b | 65 79 20 62 69 6e 64 69 |ode to k|ey bindi|
|000023b0| 6e 67 20 2a 2f 0a 69 6e | 74 20 6b 65 79 6d 61 70 |ng */.in|t keymap|
|000023c0| 5f 74 72 61 6e 73 28 73 | 63 29 0a 69 6e 74 20 73 |_trans(s|c).int s|
|000023d0| 63 3b 0a 7b 0a 69 66 28 | 73 63 3c 30 20 7c 7c 20 |c;.{.if(|sc<0 || |
|000023e0| 73 63 3e 31 32 37 29 20 | 72 65 74 75 72 6e 28 2d |sc>127) |return(-|
|000023f0| 31 29 3b 0a 72 65 74 75 | 72 6e 28 6b 65 79 6d 61 |1);.retu|rn(keyma|
|00002400| 70 5b 73 63 5d 29 3b 0a | 7d 0a 0a 0a 2f 2a 20 63 |p[sc]);.|}.../* c|
|00002410| 6f 6e 76 65 72 74 73 20 | 41 53 43 49 49 20 74 6f |onverts |ASCII to|
|00002420| 20 73 63 61 6e 63 6f 64 | 65 20 2a 2f 0a 69 6e 74 | scancod|e */.int|
|00002430| 20 73 63 61 6e 63 6f 64 | 65 5f 74 72 61 6e 73 28 | scancod|e_trans(|
|00002440| 61 73 63 29 0a 69 6e 74 | 20 61 73 63 3b 0a 7b 0a |asc).int| asc;.{.|
|00002450| 69 66 28 61 73 63 3c 30 | 20 7c 7c 20 61 73 63 3e |if(asc<0| || asc>|
|00002460| 32 35 35 29 20 72 65 74 | 75 72 6e 28 2d 31 29 3b |255) ret|urn(-1);|
|00002470| 0a 72 65 74 75 72 6e 28 | 61 73 63 69 69 6d 61 70 |.return(|asciimap|
|00002480| 5b 61 73 63 5d 29 3b 0a | 7d 0a 00 00 00 00 00 00 |[asc]);.|}.......|
|00002490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 72 61 77 6b 65 79 2f 4d | 61 6b 65 66 69 6c 65 00 |rawkey/M|akefile.|
|00002610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00002670| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00002680| 20 20 20 31 30 34 34 20 | 20 35 36 35 32 35 33 36 | 1044 | 5652536|
|00002690| 35 36 31 20 20 31 32 31 | 31 31 00 20 30 00 00 00 |561 121|11. 0...|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 23 20 6d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 72 |# makefi|le for r|
|00002810| 61 77 6b 65 79 20 6c 69 | 62 2e 0a 23 20 64 6f 20 |awkey li|b..# do |
|00002820| 61 20 27 6d 61 6b 65 20 | 69 6e 73 74 61 6c 6c 27 |a 'make |install'|
|00002830| 20 61 73 20 72 6f 6f 74 | 2e 0a 0a 23 20 79 6f 75 | as root|...# you|
|00002840| 20 6d 69 67 68 74 20 77 | 61 6e 74 20 74 6f 20 63 | might w|ant to c|
|00002850| 68 61 6e 67 65 20 74 68 | 65 73 65 2c 20 62 75 74 |hange th|ese, but|
|00002860| 20 70 72 6f 62 61 62 6c | 79 20 6e 6f 74 2e 0a 4c | probabl|y not..L|
|00002870| 49 42 44 49 52 3d 2f 75 | 73 72 2f 6c 69 62 0a 49 |IBDIR=/u|sr/lib.I|
|00002880| 4e 43 4c 55 44 45 44 49 | 52 3d 2f 75 73 72 2f 69 |NCLUDEDI|R=/usr/i|
|00002890| 6e 63 6c 75 64 65 0a 0a | 43 46 4c 41 47 53 3d 2d |nclude..|CFLAGS=-|
|000028a0| 49 2e 20 2d 4c 2e 20 20 | 20 23 20 66 6f 72 20 27 |I. -L. | # for '|
|000028b0| 74 65 73 74 70 72 6f 67 | 27 0a 0a 61 6c 6c 3a 20 |testprog|'..all: |
|000028c0| 6c 69 62 72 61 77 6b 65 | 79 2e 61 20 74 65 73 74 |librawke|y.a test|
|000028d0| 70 72 6f 67 0a 0a 6c 69 | 62 72 61 77 6b 65 79 2e |prog..li|brawkey.|
|000028e0| 61 3a 20 72 61 77 6b 65 | 79 2e 6f 0a 09 24 28 41 |a: rawke|y.o..$(A|
|000028f0| 52 29 20 72 63 73 20 6c | 69 62 72 61 77 6b 65 79 |R) rcs l|ibrawkey|
|00002900| 2e 61 20 72 61 77 6b 65 | 79 2e 6f 0a 0a 74 65 73 |.a rawke|y.o..tes|
|00002910| 74 70 72 6f 67 3a 20 74 | 65 73 74 70 72 6f 67 2e |tprog: t|estprog.|
|00002920| 6f 20 6c 69 62 72 61 77 | 6b 65 79 2e 61 0a 09 24 |o libraw|key.a..$|
|00002930| 28 43 43 29 20 24 28 43 | 46 4c 41 47 53 29 20 74 |(CC) $(C|FLAGS) t|
|00002940| 65 73 74 70 72 6f 67 2e | 6f 20 2d 6f 20 74 65 73 |estprog.|o -o tes|
|00002950| 74 70 72 6f 67 20 2d 6c | 76 67 61 20 2d 6c 72 61 |tprog -l|vga -lra|
|00002960| 77 6b 65 79 0a 23 09 63 | 68 6d 6f 64 20 34 37 31 |wkey.#.c|hmod 471|
|00002970| 31 20 74 65 73 74 70 72 | 6f 67 0a 0a 69 6e 73 74 |1 testpr|og..inst|
|00002980| 61 6c 6c 3a 0a 09 69 6e | 73 74 61 6c 6c 20 2d 6d |all:..in|stall -m|
|00002990| 20 34 34 34 20 6c 69 62 | 72 61 77 6b 65 79 2e 61 | 444 lib|rawkey.a|
|000029a0| 20 24 28 4c 49 42 44 49 | 52 29 0a 09 69 6e 73 74 | $(LIBDI|R)..inst|
|000029b0| 61 6c 6c 20 2d 6d 20 34 | 34 34 20 72 61 77 6b 65 |all -m 4|44 rawke|
|000029c0| 79 2e 68 20 24 28 49 4e | 43 4c 55 44 45 44 49 52 |y.h $(IN|CLUDEDIR|
|000029d0| 29 0a 09 40 65 63 68 6f | 20 52 61 77 6b 65 79 20 |)..@echo| Rawkey |
|000029e0| 6c 69 62 72 61 72 79 20 | 69 6e 73 74 61 6c 6c 65 |library |installe|
|000029f0| 64 2e 0a 0a 63 6c 65 61 | 6e 3a 0a 09 24 28 52 4d |d...clea|n:..$(RM|
|00002a00| 29 20 2a 2e 6f 20 2a 7e | 20 6c 69 62 72 61 77 6b |) *.o *~| librawk|
|00002a10| 65 79 2e 61 20 74 65 73 | 74 70 72 6f 67 20 61 20 |ey.a tes|tprog a |
|00002a20| 62 20 63 0a 00 00 00 00 | 00 00 00 00 00 00 00 00 |b c.....|........|
|00002a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c00| 72 61 77 6b 65 79 2f 72 | 61 77 6b 65 79 2e 6c 73 |rawkey/r|awkey.ls|
|00002c10| 6d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |m.......|........|
|00002c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002c60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00002c70| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00002c80| 20 20 20 32 31 35 31 20 | 20 35 35 35 30 32 33 32 | 2151 | 5550232|
|00002c90| 32 35 36 20 20 31 32 34 | 35 37 00 20 30 00 00 00 |256 124|57. 0...|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d00| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00002d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e00| 42 65 67 69 6e 32 0a 54 | 69 74 6c 65 20 20 20 20 |Begin2.T|itle |
|00002e10| 20 20 20 20 3d 20 52 61 | 77 6b 65 79 20 6c 69 62 | = Ra|wkey lib|
|00002e20| 72 61 72 79 0a 56 65 72 | 73 69 6f 6e 20 20 20 20 |rary.Ver|sion |
|00002e30| 20 20 3d 20 30 2e 31 0a | 44 65 73 63 31 20 20 20 | = 0.1.|Desc1 |
|00002e40| 20 20 20 20 20 3d 20 54 | 68 65 20 72 61 77 6b 65 | = T|he rawke|
|00002e50| 79 20 6c 69 62 72 61 72 | 79 20 70 61 63 6b 61 67 |y librar|y packag|
|00002e60| 65 73 20 75 70 20 74 68 | 65 20 69 6f 63 74 6c 28 |es up th|e ioctl(|
|00002e70| 29 27 73 20 61 6e 64 20 | 73 6f 20 6f 6e 20 74 68 |)'s and |so on th|
|00002e80| 61 74 0a 44 65 73 63 32 | 20 20 20 20 20 20 20 20 |at.Desc2| |
|00002e90| 3d 20 61 72 65 20 72 65 | 71 75 69 72 65 64 20 74 |= are re|quired t|
|00002ea0| 6f 20 75 73 65 20 74 68 | 65 20 52 41 57 20 6b 65 |o use th|e RAW ke|
|00002eb0| 79 62 6f 61 72 64 20 6d | 6f 64 65 2e 20 59 6f 75 |yboard m|ode. You|
|00002ec0| 20 6d 69 67 68 74 20 77 | 61 6e 74 20 74 6f 0a 44 | might w|ant to.D|
|00002ed0| 65 73 63 33 20 20 20 20 | 20 20 20 20 3d 20 75 73 |esc3 | = us|
|00002ee0| 65 20 74 68 69 73 20 66 | 6f 72 20 67 61 6d 65 73 |e this f|or games|
|00002ef0| 20 75 73 69 6e 67 20 73 | 76 67 61 6c 69 62 2c 20 | using s|vgalib, |
|00002f00| 66 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 61 6e 64 |for exam|ple, and|
|00002f10| 20 69 6e 64 65 65 64 2c | 0a 44 65 73 63 34 20 20 | indeed,|.Desc4 |
|00002f20| 20 20 20 20 20 20 3d 20 | 74 68 69 73 20 69 73 20 | = |this is |
|00002f30| 77 68 61 74 20 74 68 65 | 20 6c 69 62 72 61 72 79 |what the| library|
|00002f40| 20 69 73 20 69 6e 74 65 | 6e 64 65 64 20 66 6f 72 | is inte|nded for|
|00002f50| 2e 20 52 41 57 20 6d 6f | 64 65 20 61 6c 6c 6f 77 |. RAW mo|de allow|
|00002f60| 73 0a 44 65 73 63 35 20 | 20 20 20 20 20 20 20 3d |s.Desc5 | =|
|00002f70| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 65 20 6b | more th|an one k|
|00002f80| 65 79 20 61 74 20 6f 6e | 63 65 2c 20 6e 6f 20 77 |ey at on|ce, no w|
|00002f90| 61 69 74 69 6e 67 20 66 | 6f 72 20 6b 65 79 20 72 |aiting f|or key r|
|00002fa0| 65 70 65 61 74 2c 20 65 | 74 63 2e 0a 41 75 74 68 |epeat, e|tc..Auth|
|00002fb0| 6f 72 20 20 20 20 20 20 | 20 3d 20 52 75 73 73 65 |or | = Russe|
|00002fc0| 6c 6c 20 4d 61 72 6b 73 | 0a 41 75 74 68 6f 72 45 |ll Marks|.AuthorE|
|00002fd0| 6d 61 69 6c 20 20 3d 20 | 72 6d 31 61 6a 79 32 40 |mail = |rm1ajy2@|
|00002fe0| 67 72 65 2e 61 63 2e 75 | 6b 0a 4d 61 69 6e 74 61 |gre.ac.u|k.Mainta|
|00002ff0| 69 6e 65 72 20 20 20 3d | 20 52 75 73 73 65 6c 6c |iner =| Russell|
|00003000| 20 4d 61 72 6b 73 0a 4d | 61 69 6e 74 45 6d 61 69 | Marks.M|aintEmai|
|00003010| 6c 20 20 20 3d 20 72 6d | 31 61 6a 79 32 40 67 72 |l = rm|1ajy2@gr|
|00003020| 65 2e 61 63 2e 75 6b 0a | 53 69 74 65 31 20 20 20 |e.ac.uk.|Site1 |
|00003030| 20 20 20 20 20 3d 20 73 | 75 6e 73 69 74 65 2e 75 | = s|unsite.u|
|00003040| 6e 63 2e 65 64 75 0a 50 | 61 74 68 31 20 20 20 20 |nc.edu.P|ath1 |
|00003050| 20 20 20 20 3d 20 3f 3f | 3f 0a 46 69 6c 65 31 20 | = ??|?.File1 |
|00003060| 20 20 20 20 20 20 20 3d | 20 72 61 77 6b 65 79 2d | =| rawkey-|
|00003070| 30 2e 31 2e 74 61 72 2e | 67 7a 0a 46 69 6c 65 53 |0.1.tar.|gz.FileS|
|00003080| 69 7a 65 31 20 20 20 20 | 3d 20 36 39 30 33 0a 52 |ize1 |= 6903.R|
|00003090| 65 71 75 69 72 65 64 31 | 20 20 20 20 3d 20 73 76 |equired1| = sv|
|000030a0| 67 61 6c 69 62 2c 20 6b | 65 72 6e 65 6c 20 76 30 |galib, k|ernel v0|
|000030b0| 2e 39 39 70 6c 31 32 20 | 6f 72 20 61 62 6f 76 65 |.99pl12 |or above|
|000030c0| 20 28 6c 6f 61 64 61 62 | 6c 65 20 6b 65 79 6d 61 | (loadab|le keyma|
|000030d0| 70 73 29 0a 43 6f 70 79 | 50 6f 6c 69 63 79 31 20 |ps).Copy|Policy1 |
|000030e0| 20 3d 20 22 54 68 69 73 | 20 6c 69 62 72 61 72 79 | = "This| library|
|000030f0| 20 6d 61 79 20 62 65 20 | 66 72 65 65 6c 79 20 75 | may be |freely u|
|00003100| 73 65 64 2f 63 6f 70 69 | 65 64 2f 6d 6f 64 69 66 |sed/copi|ed/modif|
|00003110| 69 65 64 20 70 72 6f 76 | 69 64 65 64 20 74 68 69 |ied prov|ided thi|
|00003120| 73 0a 43 6f 70 79 50 6f | 6c 69 63 79 32 20 20 3d |s.CopyPo|licy2 =|
|00003130| 20 63 6f 70 79 72 69 67 | 68 74 20 6e 6f 74 69 63 | copyrig|ht notic|
|00003140| 65 20 69 73 20 6c 65 66 | 74 20 69 6e 74 61 63 74 |e is lef|t intact|
|00003150| 2e 22 0a 4b 65 79 77 6f | 72 64 73 20 20 20 20 20 |.".Keywo|rds |
|00003160| 3d 20 72 61 77 20 6b 65 | 79 62 6f 61 72 64 20 6d |= raw ke|yboard m|
|00003170| 6f 64 65 20 73 76 67 61 | 6c 69 62 20 67 61 6d 65 |ode svga|lib game|
|00003180| 73 20 67 72 61 70 68 69 | 63 73 0a 43 6f 6d 6d 65 |s graphi|cs.Comme|
|00003190| 6e 74 31 20 20 20 20 20 | 3d 20 54 68 65 20 6c 69 |nt1 |= The li|
|000031a0| 62 72 61 72 79 20 64 6f | 65 73 20 6e 6f 74 20 63 |brary do|es not c|
|000031b0| 75 72 72 65 6e 74 6c 79 | 20 74 61 6b 65 20 63 61 |urrently| take ca|
|000031c0| 72 65 20 6f 66 20 56 54 | 20 73 77 69 74 63 68 69 |re of VT| switchi|
|000031d0| 6e 67 2c 0a 43 6f 6d 6d | 65 6e 74 32 20 20 20 20 |ng,.Comm|ent2 |
|000031e0| 20 3d 20 62 75 74 20 74 | 68 69 73 20 73 68 6f 75 | = but t|his shou|
|000031f0| 6c 64 20 62 65 20 66 69 | 78 65 64 20 52 53 4e 2c |ld be fi|xed RSN,|
|00003200| 20 61 73 20 75 73 75 61 | 6c 2e 2e 2e 20 3a 29 0a | as usua|l... :).|
|00003210| 45 6e 74 65 72 65 64 20 | 20 20 20 20 20 3d 20 30 |Entered | = 0|
|00003220| 35 41 50 52 39 34 0a 45 | 6e 74 65 72 65 64 42 79 |5APR94.E|nteredBy|
|00003230| 20 20 20 20 3d 20 52 75 | 73 73 65 6c 6c 20 4d 61 | = Ru|ssell Ma|
|00003240| 72 6b 73 0a 43 68 65 63 | 6b 65 64 45 6d 61 69 6c |rks.Chec|kedEmail|
|00003250| 20 3d 20 72 6d 31 61 6a | 79 32 40 67 72 65 2e 61 | = rm1aj|y2@gre.a|
|00003260| 63 2e 75 6b 0a 45 6e 64 | 0a 00 00 00 00 00 00 00 |c.uk.End|........|
|00003270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 72 61 77 6b 65 79 2f 52 | 45 41 44 4d 45 00 00 00 |rawkey/R|EADME...|
|00003410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00003470| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00003480| 20 20 31 34 34 32 34 20 | 20 35 36 35 32 36 31 30 | 14424 | 5652610|
|00003490| 37 31 35 20 20 31 31 33 | 35 31 00 20 30 00 00 00 |715 113|51. 0...|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 52 61 77 6b 65 79 20 6c | 69 62 72 61 72 79 20 76 |Rawkey l|ibrary v|
|00003610| 30 2e 32 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |0.2.----|--------|
|00003620| 2d 2d 2d 2d 2d 2d 2d 0a | 0a 54 68 69 73 20 69 73 |-------.|.This is|
|00003630| 20 61 6e 20 61 74 74 65 | 6d 70 74 20 74 6f 20 6d | an atte|mpt to m|
|00003640| 61 6b 65 20 74 68 65 20 | 75 73 65 20 6f 66 20 72 |ake the |use of r|
|00003650| 61 77 20 6b 65 79 62 6f | 61 72 64 20 6d 6f 64 65 |aw keybo|ard mode|
|00003660| 20 66 6f 72 20 67 61 6d | 65 73 0a 65 61 73 69 65 | for gam|es.easie|
|00003670| 72 2e 20 49 74 20 68 69 | 64 65 73 20 74 68 65 20 |r. It hi|des the |
|00003680| 6e 65 63 65 73 73 61 72 | 79 20 69 6f 63 74 6c 28 |necessar|y ioctl(|
|00003690| 29 27 73 20 73 6f 6d 65 | 77 68 61 74 2c 20 61 6e |)'s some|what, an|
|000036a0| 64 20 68 6f 70 65 66 75 | 6c 6c 79 20 6d 61 6b 65 |d hopefu|lly make|
|000036b0| 73 0a 74 68 65 20 77 68 | 6f 6c 65 20 70 72 6f 63 |s.the wh|ole proc|
|000036c0| 65 73 73 20 61 20 62 69 | 74 20 6c 65 73 73 20 70 |ess a bi|t less p|
|000036d0| 61 69 6e 66 75 6c 2e 20 | 54 68 65 20 6c 69 62 72 |ainful. |The libr|
|000036e0| 61 72 79 20 61 73 73 75 | 6d 65 73 20 79 6f 75 20 |ary assu|mes you |
|000036f0| 61 72 65 0a 75 73 69 6e | 67 20 73 76 67 61 6c 69 |are.usin|g svgali|
|00003700| 62 2e 20 20 28 49 66 20 | 79 6f 75 20 6c 6f 6f 6b |b. (If |you look|
|00003710| 20 69 6e 20 76 67 61 2e | 63 20 66 72 6f 6d 20 5b | in vga.|c from [|
|00003720| 73 5d 76 67 61 6c 69 62 | 20 61 6e 64 20 63 68 65 |s]vgalib| and che|
|00003730| 63 6b 20 6f 75 74 20 74 | 68 65 0a 62 69 74 20 77 |ck out t|he.bit w|
|00003740| 68 65 72 65 20 69 74 20 | 63 68 61 6e 67 65 73 20 |here it |changes |
|00003750| 74 68 65 20 74 65 72 6d | 69 6f 20 73 65 74 74 69 |the term|io setti|
|00003760| 6e 67 73 2c 20 66 6f 72 | 20 74 65 78 74 20 6d 6f |ngs, for| text mo|
|00003770| 64 65 20 79 6f 75 27 64 | 20 6e 65 65 64 20 74 6f |de you'd| need to|
|00003780| 0a 64 6f 20 73 6f 6d 65 | 74 68 69 6e 67 20 61 6c |.do some|thing al|
|00003790| 6f 6e 67 20 74 68 6f 73 | 65 20 6c 69 6e 65 73 20 |ong thos|e lines |
|000037a0| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 72 |before c|alling r|
|000037b0| 61 77 6d 6f 64 65 5f 69 | 6e 69 74 28 29 2e 29 0a |awmode_i|nit().).|
|000037c0| 0a 56 54 20 73 77 69 74 | 63 68 69 6e 67 20 63 61 |.VT swit|ching ca|
|000037d0| 6e 20 62 65 20 61 72 72 | 61 6e 67 65 64 20 6e 6f |n be arr|anged no|
|000037e0| 77 2c 20 62 75 74 20 69 | 73 20 64 69 73 61 62 6c |w, but i|s disabl|
|000037f0| 65 64 20 62 79 20 64 65 | 66 61 75 6c 74 2e 0a 0a |ed by de|fault...|
|00003800| 0a 49 6e 73 74 61 6c 6c | 61 74 69 6f 6e 0a 2d 2d |.Install|ation.--|
|00003810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 0a 54 6f 20 69 |--------|--..To i|
|00003820| 6e 73 74 61 6c 6c 2c 20 | 64 6f 20 61 20 27 6d 61 |nstall, |do a 'ma|
|00003830| 6b 65 20 69 6e 73 74 61 | 6c 6c 27 20 61 73 20 72 |ke insta|ll' as r|
|00003840| 6f 6f 74 2e 20 54 68 69 | 73 20 77 69 6c 6c 20 69 |oot. Thi|s will i|
|00003850| 6e 73 74 61 6c 6c 20 27 | 72 61 77 6b 65 79 2e 68 |nstall '|rawkey.h|
|00003860| 27 20 69 6e 0a 2f 75 73 | 72 2f 69 6e 63 6c 75 64 |' in./us|r/includ|
|00003870| 65 2c 20 27 6c 69 62 72 | 61 77 6b 65 79 2e 61 27 |e, 'libr|awkey.a'|
|00003880| 20 69 6e 20 2f 75 73 72 | 2f 6c 69 62 2c 20 61 6e | in /usr|/lib, an|
|00003890| 64 20 63 6f 6d 70 69 6c | 65 20 61 20 73 69 6d 70 |d compil|e a simp|
|000038a0| 6c 65 20 74 65 73 74 20 | 70 72 6f 67 72 61 6d 0a |le test |program.|
|000038b0| 28 75 73 69 6e 67 20 73 | 76 67 61 6c 69 62 29 2c |(using s|vgalib),|
|000038c0| 20 63 61 6c 6c 65 64 20 | 27 74 65 73 74 70 72 6f | called |'testpro|
|000038d0| 67 27 2e 0a 0a 41 66 74 | 65 72 20 74 68 61 74 2c |g'...Aft|er that,|
|000038e0| 20 63 68 65 63 6b 20 27 | 74 65 73 74 70 72 6f 67 | check '|testprog|
|000038f0| 27 20 77 6f 72 6b 73 20 | 62 79 20 72 75 6e 6e 69 |' works |by runni|
|00003900| 6e 67 20 69 74 2c 20 75 | 73 69 6e 67 20 74 68 65 |ng it, u|sing the|
|00003910| 20 63 75 72 73 6f 72 73 | 20 74 6f 20 6d 6f 76 65 | cursors| to move|
|00003920| 0a 74 68 65 20 64 6f 74 | 20 61 72 6f 75 6e 64 2c |.the dot| around,|
|00003930| 20 61 6e 64 20 45 73 63 | 20 74 6f 20 71 75 69 74 | and Esc| to quit|
|00003940| 2e 20 43 68 65 63 6b 20 | 74 68 61 74 20 68 6f 6c |. Check |that hol|
|00003950| 64 69 6e 67 2c 20 73 61 | 79 2c 20 75 70 20 61 6e |ding, sa|y, up an|
|00003960| 64 20 6c 65 66 74 20 63 | 75 72 73 6f 72 0a 6b 65 |d left c|ursor.ke|
|00003970| 79 73 20 61 74 20 74 68 | 65 20 73 61 6d 65 20 74 |ys at th|e same t|
|00003980| 69 6d 65 20 67 69 76 65 | 73 20 61 20 64 69 61 67 |ime give|s a diag|
|00003990| 6f 6e 61 6c 2c 20 61 6e | 64 20 61 6c 73 6f 20 63 |onal, an|d also c|
|000039a0| 68 65 63 6b 20 74 68 65 | 20 72 65 73 70 6f 6e 73 |heck the| respons|
|000039b0| 65 20 69 73 0a 69 6e 73 | 74 61 6e 74 20 77 69 74 |e is.ins|tant wit|
|000039c0| 68 20 6e 6f 20 6b 65 79 | 62 6f 61 72 64 20 72 65 |h no key|board re|
|000039d0| 70 65 61 74 20 64 65 6c | 61 79 73 2e 0a 0a 0a 48 |peat del|ays....H|
|000039e0| 6f 77 20 74 6f 20 75 73 | 65 20 74 68 65 20 52 61 |ow to us|e the Ra|
|000039f0| 77 6b 65 79 20 6c 69 62 | 72 61 72 79 0a 2d 2d 2d |wkey lib|rary.---|
|00003a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 0a 54 68 65 20 |--------|--..The |
|00003a20| 69 6d 70 6f 72 74 61 6e | 74 20 66 75 6e 63 74 69 |importan|t functi|
|00003a30| 6f 6e 73 20 74 6f 20 6b | 6e 6f 77 20 61 62 6f 75 |ons to k|now abou|
|00003a40| 74 20 61 72 65 3a 0a 0a | 0a 69 6e 74 20 72 61 77 |t are:..|.int raw|
|00003a50| 6d 6f 64 65 5f 69 6e 69 | 74 28 29 0a 0a 63 61 6c |mode_ini|t()..cal|
|00003a60| 6c 20 74 68 69 73 20 74 | 6f 20 73 74 61 72 74 20 |l this t|o start |
|00003a70| 75 73 69 6e 67 20 72 61 | 77 20 6d 6f 64 65 2e 0a |using ra|w mode..|
|00003a80| 72 65 74 75 72 6e 73 20 | 31 20 69 66 20 6f 6b 2c |returns |1 if ok,|
|00003a90| 20 30 20 6f 6e 20 65 72 | 72 6f 72 2e 0a 59 6f 75 | 0 on er|ror..You|
|00003aa0| 20 73 68 6f 75 6c 64 20 | 62 65 20 69 6e 20 67 72 | should |be in gr|
|00003ab0| 61 70 68 69 63 73 20 6d | 6f 64 65 20 62 65 66 6f |aphics m|ode befo|
|00003ac0| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 2c |re calli|ng this,|
|00003ad0| 20 69 66 20 75 73 69 6e | 67 20 73 76 67 61 6c 69 | if usin|g svgali|
|00003ae0| 62 2e 20 41 0a 74 79 70 | 69 63 61 6c 20 73 74 61 |b. A.typ|ical sta|
|00003af0| 72 74 75 70 20 73 65 71 | 75 65 6e 63 65 20 6d 69 |rtup seq|uence mi|
|00003b00| 67 68 74 20 67 6f 3a 0a | 0a 09 6d 61 69 6e 28 29 |ght go:.|..main()|
|00003b10| 0a 09 7b 0a 09 76 67 61 | 5f 69 6e 69 74 28 29 3b |..{..vga|_init();|
|00003b20| 0a 09 76 67 61 5f 73 65 | 74 6d 6f 64 65 28 47 33 |..vga_se|tmode(G3|
|00003b30| 32 30 78 32 30 30 78 32 | 35 36 29 3b 0a 09 72 61 |20x200x2|56);..ra|
|00003b40| 77 6d 6f 64 65 5f 69 6e | 69 74 28 29 3b 0a 09 2e |wmode_in|it();...|
|00003b50| 2e 2e 0a 0a 0a 76 6f 69 | 64 20 72 61 77 6d 6f 64 |.....voi|d rawmod|
|00003b60| 65 5f 65 78 69 74 28 29 | 0a 0a 63 61 6c 6c 20 74 |e_exit()|..call t|
|00003b70| 68 69 73 20 74 6f 20 72 | 65 73 75 6d 65 20 6e 6f |his to r|esume no|
|00003b80| 72 6d 61 6c 20 6f 70 65 | 72 61 74 69 6f 6e 2e 0a |rmal ope|ration..|
|00003b90| 41 6c 74 68 6f 75 67 68 | 20 69 74 27 73 20 6e 6f |Although| it's no|
|00003ba0| 74 20 61 63 74 75 61 6c | 6c 79 20 6e 65 63 65 73 |t actual|ly neces|
|00003bb0| 73 61 72 79 2c 20 69 74 | 27 73 20 70 72 6f 62 61 |sary, it|'s proba|
|00003bc0| 62 6c 79 20 6e 69 63 65 | 73 74 20 74 6f 20 63 61 |bly nice|st to ca|
|00003bd0| 6c 6c 20 74 68 69 73 20 | 6a 75 73 74 0a 62 65 66 |ll this |just.bef|
|00003be0| 6f 72 65 20 65 6e 64 69 | 6e 67 20 77 69 74 68 20 |ore endi|ng with |
|00003bf0| 27 76 67 61 5f 73 65 74 | 6d 6f 64 65 28 54 45 58 |'vga_set|mode(TEX|
|00003c00| 54 29 27 20 6f 72 20 77 | 68 61 74 65 76 65 72 2e |T)' or w|hatever.|
|00003c10| 0a 0a 57 41 52 4e 49 4e | 47 3a 20 4d 61 6b 65 20 |..WARNIN|G: Make |
|00003c20| 2a 73 75 72 65 2a 20 79 | 6f 75 20 61 72 65 20 6f |*sure* y|ou are o|
|00003c30| 75 74 20 6f 66 20 52 41 | 57 20 6d 6f 64 65 20 62 |ut of RA|W mode b|
|00003c40| 65 66 6f 72 65 20 65 78 | 69 74 69 6e 67 2c 20 6f |efore ex|iting, o|
|00003c50| 72 20 62 65 6c 69 65 76 | 65 20 6d 65 0a 79 6f 75 |r believ|e me.you|
|00003c60| 27 6c 6c 20 72 65 67 72 | 65 74 20 69 74 21 20 43 |'ll regr|et it! C|
|00003c70| 6f 6e 73 69 64 65 72 20 | 73 65 74 74 69 6e 67 20 |onsider |setting |
|00003c80| 75 70 20 73 69 67 6e 61 | 6c 20 68 61 6e 64 6c 65 |up signa|l handle|
|00003c90| 72 73 20 66 6f 72 20 74 | 68 69 6e 67 73 20 6c 69 |rs for t|hings li|
|00003ca0| 6b 65 0a 53 49 47 53 45 | 47 56 20 6f 72 20 77 68 |ke.SIGSE|GV or wh|
|00003cb0| 61 74 65 76 65 72 20 6a | 75 73 74 20 69 6e 20 63 |atever j|ust in c|
|00003cc0| 61 73 65 2e 0a 0a 0a 76 | 6f 69 64 20 73 63 61 6e |ase....v|oid scan|
|00003cd0| 5f 6b 65 79 62 6f 61 72 | 64 28 29 0a 0a 74 68 69 |_keyboar|d()..thi|
|00003ce0| 73 20 68 61 6e 64 6c 65 | 73 20 73 63 61 6e 63 6f |s handle|s scanco|
|00003cf0| 64 65 20 72 65 61 64 69 | 6e 67 20 66 72 6f 6d 20 |de readi|ng from |
|00003d00| 74 68 65 20 6b 65 79 62 | 6f 61 72 64 2c 20 77 68 |the keyb|oard, wh|
|00003d10| 69 63 68 20 79 6f 75 20 | 73 68 6f 75 6c 64 6e 27 |ich you |shouldn'|
|00003d20| 74 0a 2a 64 69 72 65 63 | 74 6c 79 2a 20 77 6f 72 |t.*direc|tly* wor|
|00003d30| 72 79 20 61 62 6f 75 74 | 2e 20 59 6f 75 20 6e 65 |ry about|. You ne|
|00003d40| 65 64 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |ed to ca|ll this |
|00003d50| 65 76 65 72 79 20 73 6f | 20 6f 66 74 65 6e 20 2d |every so| often -|
|00003d60| 20 74 68 65 20 65 61 73 | 69 65 73 74 0a 77 61 79 | the eas|iest.way|
|00003d70| 20 69 73 20 74 6f 20 63 | 61 6c 6c 20 69 74 20 77 | is to c|all it w|
|00003d80| 68 65 6e 65 76 65 72 20 | 79 6f 75 20 77 6f 75 6c |henever |you woul|
|00003d90| 64 20 6f 72 64 69 6e 61 | 72 69 6c 79 20 63 61 6c |d ordina|rily cal|
|00003da0| 6c 2c 20 73 61 79 2c 20 | 76 67 61 5f 67 65 74 63 |l, say, |vga_getc|
|00003db0| 68 28 29 2e 20 4e 6f 74 | 65 0a 74 68 61 74 20 74 |h(). Not|e.that t|
|00003dc0| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 68 61 73 |his func|tion has|
|00003dd0| 20 6e 6f 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 | no retu|rn value|
|00003de0| 20 2d 20 63 61 6c 6c 20 | 69 74 20 66 69 72 73 74 | - call |it first|
|00003df0| 20 74 68 65 6e 20 75 73 | 65 0a 69 73 5f 6b 65 79 | then us|e.is_key|
|00003e00| 5f 70 72 65 73 73 65 64 | 28 29 20 74 6f 20 63 68 |_pressed|() to ch|
|00003e10| 65 63 6b 20 74 68 65 20 | 73 74 61 74 75 73 20 6f |eck the |status o|
|00003e20| 66 20 61 6e 79 20 69 6e | 64 69 76 69 64 75 61 6c |f any in|dividual|
|00003e30| 20 6b 65 79 2e 0a 0a 53 | 61 79 20 69 66 20 79 6f | key...S|ay if yo|
|00003e40| 75 20 77 6f 75 6c 64 20 | 6f 72 64 69 6e 61 72 69 |u would |ordinari|
|00003e50| 6c 79 20 75 73 65 20 73 | 6f 6d 65 74 68 69 6e 67 |ly use s|omething|
|00003e60| 20 6c 69 6b 65 20 74 68 | 69 73 20 66 6f 72 20 61 | like th|is for a|
|00003e70| 20 27 70 72 65 73 73 20 | 73 70 61 63 65 27 0a 74 | 'press |space'.t|
|00003e80| 79 70 65 20 70 61 75 73 | 65 3a 0a 0a 09 77 68 69 |ype paus|e:...whi|
|00003e90| 6c 65 28 76 67 61 5f 67 | 65 74 63 68 28 29 21 3d |le(vga_g|etch()!=|
|00003ea0| 33 32 29 3b 0a 0a 79 6f | 75 20 77 6f 75 6c 64 20 |32);..yo|u would |
|00003eb0| 6e 6f 77 20 64 6f 3a 0a | 0a 09 5b 69 6e 73 65 72 |now do:.|..[inser|
|00003ec0| 74 20 27 23 69 6e 63 6c | 75 64 65 20 3c 75 6e 69 |t '#incl|ude <uni|
|00003ed0| 73 74 64 2e 68 3e 27 20 | 61 74 20 74 68 65 20 74 |std.h>' |at the t|
|00003ee0| 6f 70 5d 0a 0a 09 64 6f | 0a 20 20 20 20 20 20 20 |op]...do|. |
|00003ef0| 20 20 20 7b 0a 09 20 20 | 75 73 6c 65 65 70 28 31 | {.. |usleep(1|
|00003f00| 30 30 30 30 29 3b 09 2f | 2a 20 63 68 65 63 6b 20 |0000);./|* check |
|00003f10| 61 74 20 6d 6f 73 74 20 | 65 76 65 72 79 20 31 2f |at most |every 1/|
|00003f20| 31 30 30 74 68 20 6f 66 | 20 61 20 73 65 63 6f 6e |100th of| a secon|
|00003f30| 64 20 2a 2f 0a 09 20 20 | 73 63 61 6e 5f 6b 65 79 |d */.. |scan_key|
|00003f40| 62 6f 61 72 64 28 29 3b | 0a 09 20 20 7d 0a 09 77 |board();|.. }..w|
|00003f50| 68 69 6c 65 28 21 69 73 | 5f 6b 65 79 5f 70 72 65 |hile(!is|_key_pre|
|00003f60| 73 73 65 64 28 53 50 41 | 43 45 5f 42 41 52 29 29 |ssed(SPA|CE_BAR))|
|00003f70| 3b 0a 0a 69 2e 65 2e 20 | 73 63 61 6e 5f 6b 65 79 |;..i.e. |scan_key|
|00003f80| 62 6f 61 72 64 28 29 20 | 67 6f 65 73 20 77 68 65 |board() |goes whe|
|00003f90| 72 65 20 79 6f 75 20 77 | 6f 75 6c 64 20 6e 6f 72 |re you w|ould nor|
|00003fa0| 6d 61 6c 6c 79 20 70 75 | 74 20 61 20 76 67 61 5f |mally pu|t a vga_|
|00003fb0| 67 65 74 63 68 28 29 2c | 20 62 75 74 0a 77 68 65 |getch(),| but.whe|
|00003fc0| 6e 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 74 65 |n you ne|ed to te|
|00003fd0| 73 74 20 69 66 20 61 20 | 6b 65 79 20 77 61 73 2f |st if a |key was/|
|00003fe0| 69 73 20 70 72 65 73 73 | 65 64 2c 20 79 6f 75 20 |is press|ed, you |
|00003ff0| 75 73 65 20 69 73 5f 6b | 65 79 5f 70 72 65 73 73 |use is_k|ey_press|
|00004000| 65 64 28 29 20 28 73 65 | 65 0a 62 65 6c 6f 77 29 |ed() (se|e.below)|
|00004010| 2e 20 54 68 65 20 75 73 | 6c 65 65 70 28 29 20 69 |. The us|leep() i|
|00004020| 73 20 74 6f 20 70 72 65 | 76 65 6e 74 20 62 75 72 |s to pre|vent bur|
|00004030| 6e 69 6e 67 20 75 6e 6e | 65 63 65 73 73 61 72 79 |ning unn|ecessary|
|00004040| 20 43 50 55 20 74 69 6d | 65 2c 20 61 73 0a 73 63 | CPU tim|e, as.sc|
|00004050| 61 6e 5f 6b 65 79 62 6f | 61 72 64 28 29 20 69 73 |an_keybo|ard() is|
|00004060| 20 6e 6f 6e 2d 62 6c 6f | 63 6b 69 6e 67 2c 20 69 | non-blo|cking, i|
|00004070| 2e 65 2e 20 69 74 20 64 | 6f 65 73 6e 27 74 20 77 |.e. it d|oesn't w|
|00004080| 61 69 74 20 66 6f 72 20 | 61 20 6b 65 79 70 72 65 |ait for |a keypre|
|00004090| 73 73 2e 0a 0a 0a 69 6e | 74 20 69 73 5f 6b 65 79 |ss....in|t is_key|
|000040a0| 5f 70 72 65 73 73 65 64 | 28 69 6e 74 20 73 63 61 |_pressed|(int sca|
|000040b0| 6e 63 6f 64 65 29 0a 0a | 74 68 69 73 20 74 65 6c |ncode)..|this tel|
|000040c0| 6c 73 20 79 6f 75 20 69 | 66 20 61 20 73 70 65 63 |ls you i|f a spec|
|000040d0| 69 66 69 63 20 6b 65 79 | 20 69 73 20 70 72 65 73 |ific key| is pres|
|000040e0| 73 65 64 2e 0a 52 65 74 | 75 72 6e 73 20 31 20 69 |sed..Ret|urns 1 i|
|000040f0| 66 20 74 72 75 65 2c 20 | 30 20 6f 74 68 65 72 77 |f true, |0 otherw|
|00004100| 69 73 65 0a 54 68 65 20 | 61 72 67 20 69 73 20 74 |ise.The |arg is t|
|00004110| 68 65 20 73 63 61 6e 63 | 6f 64 65 20 6f 66 20 74 |he scanc|ode of t|
|00004120| 68 65 20 6b 65 79 2e 20 | 59 6f 75 20 64 6f 6e 27 |he key. |You don'|
|00004130| 74 20 72 65 61 6c 6c 79 | 20 6e 65 65 64 20 74 6f |t really| need to|
|00004140| 20 6b 6e 6f 77 20 61 62 | 6f 75 74 0a 74 68 61 74 | know ab|out.that|
|00004150| 2c 20 77 68 61 74 20 79 | 6f 75 20 2a 64 6f 2a 20 |, what y|ou *do* |
|00004160| 6e 65 65 64 20 74 6f 20 | 6b 6e 6f 77 20 69 73 20 |need to |know is |
|00004170| 74 68 61 74 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |that the| followi|
|00004180| 6e 67 20 73 79 6d 62 6f | 6c 73 20 61 72 65 0a 70 |ng symbo|ls are.p|
|00004190| 72 65 2d 64 65 66 69 6e | 65 64 20 61 6e 64 20 63 |re-defin|ed and c|
|000041a0| 61 6e 20 62 65 20 75 73 | 65 64 20 61 73 20 61 72 |an be us|ed as ar|
|000041b0| 67 73 20 74 6f 20 69 73 | 5f 6b 65 79 5f 70 72 65 |gs to is|_key_pre|
|000041c0| 73 73 65 64 28 29 3a 0a | 0a 09 45 53 43 41 50 45 |ssed():.|..ESCAPE|
|000041d0| 5f 4b 45 59 2c 20 45 4e | 54 45 52 5f 4b 45 59 2c |_KEY, EN|TER_KEY,|
|000041e0| 20 42 41 43 4b 53 50 41 | 43 45 2c 20 54 41 42 5f | BACKSPA|CE, TAB_|
|000041f0| 4b 45 59 0a 09 4c 45 46 | 54 5f 53 48 49 46 54 2c |KEY..LEF|T_SHIFT,|
|00004200| 20 52 49 47 48 54 5f 53 | 48 49 46 54 2c 20 4c 45 | RIGHT_S|HIFT, LE|
|00004210| 46 54 5f 43 54 52 4c 2c | 20 4c 45 46 54 5f 41 4c |FT_CTRL,| LEFT_AL|
|00004220| 54 09 28 73 65 65 20 62 | 65 6c 6f 77 29 0a 09 46 |T.(see b|elow)..F|
|00004230| 55 4e 43 5f 4b 45 59 28 | 78 29 09 28 78 20 72 61 |UNC_KEY(|x).(x ra|
|00004240| 6e 67 69 6e 67 20 66 72 | 6f 6d 20 31 20 74 6f 20 |nging fr|om 1 to |
|00004250| 31 32 29 0a 09 43 55 52 | 53 4f 52 5f 4c 45 46 54 |12)..CUR|SOR_LEFT|
|00004260| 2c 20 43 55 52 53 4f 52 | 5f 52 49 47 48 54 2c 20 |, CURSOR|_RIGHT, |
|00004270| 43 55 52 53 4f 52 5f 55 | 50 2c 20 43 55 52 53 4f |CURSOR_U|P, CURSO|
|00004280| 52 5f 44 4f 57 4e 2c 20 | 4b 45 59 50 41 44 5f 43 |R_DOWN, |KEYPAD_C|
|00004290| 45 4e 54 45 52 0a 09 49 | 4e 53 45 52 54 5f 4b 45 |ENTER..I|NSERT_KE|
|000042a0| 59 2c 20 44 45 4c 45 54 | 45 5f 4b 45 59 2c 20 48 |Y, DELET|E_KEY, H|
|000042b0| 4f 4d 45 5f 4b 45 59 2c | 20 45 4e 44 5f 4b 45 59 |OME_KEY,| END_KEY|
|000042c0| 2c 20 50 41 47 45 5f 55 | 50 2c 20 50 41 47 45 5f |, PAGE_U|P, PAGE_|
|000042d0| 44 4f 57 4e 0a 09 43 41 | 50 53 5f 4c 4f 43 4b 2c |DOWN..CA|PS_LOCK,|
|000042e0| 20 4e 55 4d 5f 4c 4f 43 | 4b 2c 20 53 43 52 4f 4c | NUM_LOC|K, SCROL|
|000042f0| 4c 5f 4c 4f 43 4b 0a 09 | 47 52 41 59 5f 50 4c 55 |L_LOCK..|GRAY_PLU|
|00004300| 53 2c 20 47 52 41 59 5f | 4d 49 4e 55 53 2c 20 47 |S, GRAY_|MINUS, G|
|00004310| 52 41 59 5f 4d 55 4c 54 | 49 50 4c 59 2c 20 47 52 |RAY_MULT|IPLY, GR|
|00004320| 41 59 5f 44 49 56 49 44 | 45 09 28 73 65 65 20 62 |AY_DIVID|E.(see b|
|00004330| 65 6c 6f 77 29 0a 0a 4e | 6f 74 65 20 74 68 65 20 |elow)..N|ote the |
|00004340| 66 6f 6c 6c 6f 77 69 6e | 67 3a 0a 31 2e 20 27 4c |followin|g:.1. 'L|
|00004350| 45 46 54 5f 43 54 52 4c | 27 20 61 6e 64 20 27 4c |EFT_CTRL|' and 'L|
|00004360| 45 46 54 5f 41 4c 54 27 | 20 61 63 74 75 61 6c 6c |EFT_ALT'| actuall|
|00004370| 79 20 63 6f 76 65 72 20 | 62 6f 74 68 20 63 74 72 |y cover |both ctr|
|00004380| 6c 27 73 20 61 6e 64 20 | 61 6c 74 27 73 2e 0a 20 |l's and |alt's.. |
|00004390| 20 20 27 4c 45 46 54 5f | 53 48 49 46 54 27 20 61 | 'LEFT_|SHIFT' a|
|000043a0| 6e 64 20 27 52 49 47 48 | 54 5f 53 48 49 46 54 27 |nd 'RIGH|T_SHIFT'|
|000043b0| 20 64 6f 20 63 6f 76 65 | 72 20 74 68 65 20 72 65 | do cove|r the re|
|000043c0| 73 70 65 63 74 69 76 65 | 20 73 68 69 66 74 27 73 |spective| shift's|
|000043d0| 2c 20 68 6f 77 65 76 65 | 72 2e 0a 32 2e 20 27 47 |, howeve|r..2. 'G|
|000043e0| 52 41 59 5f 4d 55 4c 54 | 49 50 4c 59 27 20 69 73 |RAY_MULT|IPLY' is|
|000043f0| 20 61 6c 73 6f 20 67 65 | 6e 65 72 61 74 65 64 20 | also ge|nerated |
|00004400| 62 79 20 50 72 69 6e 74 | 53 63 72 65 65 6e 2e 0a |by Print|Screen..|
|00004410| 33 2e 20 54 68 65 72 65 | 20 69 73 20 6e 6f 20 72 |3. There| is no r|
|00004420| 65 6c 69 61 62 6c 65 20 | 77 61 79 20 74 6f 20 63 |eliable |way to c|
|00004430| 68 65 63 6b 20 66 6f 72 | 20 50 72 69 6e 74 53 63 |heck for| PrintSc|
|00004440| 72 65 65 6e 20 6f 72 20 | 50 61 75 73 65 20 79 65 |reen or |Pause ye|
|00004450| 74 2e 20 53 6f 72 72 79 | 2e 0a 34 2e 20 4b 45 59 |t. Sorry|..4. KEY|
|00004460| 50 41 44 5f 43 45 4e 54 | 45 52 20 69 73 20 74 68 |PAD_CENT|ER is th|
|00004470| 65 20 27 35 27 20 69 6e | 20 74 68 65 20 63 65 6e |e '5' in| the cen|
|00004480| 74 72 65 20 6f 66 20 74 | 68 65 20 6e 75 6d 65 72 |tre of t|he numer|
|00004490| 69 63 20 6b 65 79 70 61 | 64 2e 0a 35 2e 20 49 66 |ic keypa|d..5. If|
|000044a0| 20 74 68 65 20 6b 65 79 | 20 79 6f 75 20 77 61 6e | the key| you wan|
|000044b0| 74 20 74 6f 20 63 68 65 | 63 6b 20 66 6f 72 20 69 |t to che|ck for i|
|000044c0| 73 20 61 20 6c 65 74 74 | 65 72 20 6f 72 20 6e 75 |s a lett|er or nu|
|000044d0| 6d 62 65 72 20 6b 65 79 | 2c 0a 20 20 20 75 73 65 |mber key|,. use|
|000044e0| 20 73 63 61 6e 63 6f 64 | 65 5f 74 72 61 6e 73 28 | scancod|e_trans(|
|000044f0| 29 20 61 73 20 73 68 6f | 77 6e 20 62 65 6c 6f 77 |) as sho|wn below|
|00004500| 20 69 6e 20 74 68 65 20 | 27 43 74 72 6c 2d 58 27 | in the |'Ctrl-X'|
|00004510| 20 65 78 61 6d 70 6c 65 | 2e 0a 36 2e 20 49 66 20 | example|..6. If |
|00004520| 74 68 65 20 6b 65 79 20 | 79 6f 75 20 77 61 6e 74 |the key |you want|
|00004530| 20 74 6f 20 63 68 65 63 | 6b 20 66 6f 72 20 69 73 | to chec|k for is|
|00004540| 20 73 68 69 66 74 65 64 | 2c 20 74 68 69 6e 6b 20 | shifted|, think |
|00004550| 61 62 6f 75 74 20 68 6f | 77 20 6d 61 6e 79 20 6b |about ho|w many k|
|00004560| 65 79 73 0a 20 20 20 79 | 6f 75 27 72 65 20 70 72 |eys. y|ou're pr|
|00004570| 65 73 73 69 6e 67 20 74 | 6f 20 67 65 74 20 74 68 |essing t|o get th|
|00004580| 61 74 20 6b 65 79 2c 20 | 74 68 65 6e 20 73 65 65 |at key, |then see|
|00004590| 20 37 20 62 65 6c 6f 77 | 2e 0a 37 2e 20 49 66 20 | 7 below|..7. If |
|000045a0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 63 68 65 63 |you want| to chec|
|000045b0| 6b 20 66 6f 72 2c 20 73 | 61 79 2c 20 43 74 72 6c |k for, s|ay, Ctrl|
|000045c0| 2d 58 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 63 |-X, you |should c|
|000045d0| 68 65 63 6b 20 74 68 65 | 6d 20 61 73 20 74 77 6f |heck the|m as two|
|000045e0| 0a 20 20 20 6b 65 79 73 | 20 62 65 69 6e 67 20 73 |. keys| being s|
|000045f0| 69 6d 75 6c 74 61 6e 65 | 6f 75 73 6c 79 20 70 72 |imultane|ously pr|
|00004600| 65 73 73 65 64 2c 20 69 | 2e 65 2e 20 64 6f 3a 0a |essed, i|.e. do:.|
|00004610| 0a 20 20 20 20 20 69 66 | 28 69 73 5f 6b 65 79 5f |. if|(is_key_|
|00004620| 70 72 65 73 73 65 64 28 | 4c 45 46 54 5f 43 54 52 |pressed(|LEFT_CTR|
|00004630| 4c 29 20 26 26 20 69 73 | 5f 6b 65 79 5f 70 72 65 |L) && is|_key_pre|
|00004640| 73 73 65 64 28 73 63 61 | 6e 63 6f 64 65 5f 74 72 |ssed(sca|ncode_tr|
|00004650| 61 6e 73 28 27 78 27 29 | 29 29 0a 09 2e 2e 2e 0a |ans('x')|))......|
|00004660| 0a 38 2e 20 49 66 20 74 | 68 65 20 6b 65 79 20 79 |.8. If t|he key y|
|00004670| 6f 75 20 77 61 6e 74 20 | 74 6f 20 63 68 65 63 6b |ou want |to check|
|00004680| 20 66 6f 72 20 69 73 6e | 27 74 20 63 6f 76 65 72 | for isn|'t cover|
|00004690| 65 64 20 62 79 20 61 6e | 79 20 6f 66 20 74 68 65 |ed by an|y of the|
|000046a0| 20 61 62 6f 76 65 2c 0a | 20 20 20 64 6f 6e 27 74 | above,.| don't|
|000046b0| 20 75 73 65 20 69 74 2e | 20 3a 29 20 20 49 74 20 | use it.| :) It |
|000046c0| 70 72 6f 62 61 62 6c 79 | 20 77 6f 6e 27 74 20 73 |probably| won't s|
|000046d0| 74 61 79 20 74 68 65 20 | 73 61 6d 65 20 62 65 74 |tay the |same bet|
|000046e0| 77 65 65 6e 20 64 69 66 | 66 65 72 65 6e 74 0a 20 |ween dif|ferent. |
|000046f0| 20 20 6e 61 74 69 6f 6e | 61 6c 20 6b 65 79 62 6f | nation|al keybo|
|00004700| 61 72 64 73 20 61 6e 79 | 68 6f 77 2c 20 73 6f 20 |ards any|how, so |
|00004710| 69 74 27 73 20 61 20 62 | 61 64 20 6d 6f 76 65 20 |it's a b|ad move |
|00004720| 74 6f 20 63 68 65 63 6b | 20 66 6f 72 20 69 74 2e |to check| for it.|
|00004730| 0a 39 2e 20 49 6e 20 61 | 20 73 69 6d 69 6c 61 72 |.9. In a| similar|
|00004740| 20 76 65 69 6e 2c 20 67 | 61 6d 65 73 20 77 72 69 | vein, g|ames wri|
|00004750| 74 65 72 73 20 70 6c 65 | 61 73 65 20 61 6c 6c 6f |ters ple|ase allo|
|00004760| 77 20 72 65 64 65 66 69 | 6e 61 62 6c 65 20 6b 65 |w redefi|nable ke|
|00004770| 79 73 21 20 49 74 27 73 | 20 61 0a 20 20 20 62 69 |ys! It's| a. bi|
|00004780| 74 20 6f 66 20 61 20 70 | 61 69 6e 2c 20 62 75 74 |t of a p|ain, but|
|00004790| 20 69 73 20 61 20 67 6f | 64 73 65 6e 64 20 66 6f | is a go|dsend fo|
|000047a0| 72 20 70 65 6f 70 6c 65 | 20 77 68 6f 20 68 61 74 |r people| who hat|
|000047b0| 65 20 79 6f 75 72 20 77 | 6f 6e 64 65 72 66 75 6c |e your w|onderful|
|000047c0| 0a 20 20 20 70 65 72 66 | 65 63 74 20 63 68 6f 69 |. perf|ect choi|
|000047d0| 63 65 20 6f 66 20 6b 65 | 79 73 20 3a 29 20 6f 72 |ce of ke|ys :) or|
|000047e0| 20 68 61 76 65 2c 20 73 | 61 79 2c 20 61 6e 20 41 | have, s|ay, an A|
|000047f0| 5a 45 52 54 59 20 6b 65 | 79 62 6f 61 72 64 20 77 |ZERTY ke|yboard w|
|00004800| 68 69 63 68 20 6d 69 67 | 68 74 0a 20 20 20 73 63 |hich mig|ht. sc|
|00004810| 72 65 77 20 74 68 6f 73 | 65 20 6b 65 79 73 27 20 |rew thos|e keys' |
|00004820| 61 72 72 61 6e 67 65 6d | 65 6e 74 20 75 70 20 62 |arrangem|ent up b|
|00004830| 61 64 6c 79 2e 0a 0a 53 | 65 65 20 74 65 73 74 70 |adly...S|ee testp|
|00004840| 72 6f 67 2e 63 20 66 6f | 72 20 61 20 66 75 6c 6c |rog.c fo|r a full|
|00004850| 65 72 20 65 78 61 6d 70 | 6c 65 20 6f 66 20 68 6f |er examp|le of ho|
|00004860| 77 20 74 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |w this f|unction |
|00004870| 73 68 6f 75 6c 64 20 62 | 65 20 75 73 65 64 2e 0a |should b|e used..|
|00004880| 0a 0a 69 6e 74 20 69 73 | 5f 61 6e 79 5f 6b 65 79 |..int is|_any_key|
|00004890| 5f 70 72 65 73 73 65 64 | 28 29 0a 0a 74 68 69 73 |_pressed|()..this|
|000048a0| 20 69 73 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 74 | is a fu|nction t|
|000048b0| 68 61 74 20 63 68 65 63 | 6b 73 20 69 66 20 61 6e |hat chec|ks if an|
|000048c0| 79 20 6b 65 79 20 69 73 | 20 70 72 65 73 73 65 64 |y key is| pressed|
|000048d0| 20 28 69 6e 63 6c 75 64 | 69 6e 67 20 73 68 69 66 | (includ|ing shif|
|000048e0| 74 73 20 65 74 63 2e 29 | 0a 74 6f 20 73 61 76 65 |ts etc.)|.to save|
|000048f0| 20 79 6f 75 20 68 61 76 | 69 6e 67 20 74 6f 20 64 | you hav|ing to d|
|00004900| 6f 20 69 74 20 66 6f 72 | 20 74 68 6f 73 65 20 27 |o it for| those '|
|00004910| 70 72 65 73 73 20 61 6e | 79 20 6b 65 79 27 20 6a |press an|y key' j|
|00004920| 6f 62 73 2e 0a 52 65 74 | 75 72 6e 73 20 31 20 69 |obs..Ret|urns 1 i|
|00004930| 66 20 74 72 75 65 2c 20 | 30 20 6f 74 68 65 72 77 |f true, |0 otherw|
|00004940| 69 73 65 2e 0a 0a 0a 69 | 6e 74 20 73 63 61 6e 63 |ise....i|nt scanc|
|00004950| 6f 64 65 5f 74 72 61 6e | 73 28 69 6e 74 20 61 73 |ode_tran|s(int as|
|00004960| 63 69 69 76 61 6c 29 0a | 0a 65 66 66 65 63 74 69 |ciival).|.effecti|
|00004970| 76 65 6c 79 20 72 65 74 | 75 72 6e 73 20 74 68 65 |vely ret|urns the|
|00004980| 20 73 63 61 6e 63 6f 64 | 65 20 66 6f 72 20 74 68 | scancod|e for th|
|00004990| 65 20 67 69 76 65 6e 20 | 41 53 43 49 49 0a 41 6c |e given |ASCII.Al|
|000049a0| 73 6f 20 72 65 74 75 72 | 6e 73 20 2d 31 20 69 66 |so retur|ns -1 if|
|000049b0| 20 6e 6f 6e 65 20 66 6f | 75 6e 64 2e 0a 55 73 65 | none fo|und..Use|
|000049c0| 20 74 68 69 73 20 77 69 | 74 68 20 69 73 5f 6b 65 | this wi|th is_ke|
|000049d0| 79 5f 70 72 65 73 73 65 | 64 20 74 6f 20 74 65 6c |y_presse|d to tel|
|000049e0| 6c 20 69 66 20 61 20 6c | 65 74 74 65 72 20 6f 72 |l if a l|etter or|
|000049f0| 20 6e 75 6d 62 65 72 20 | 6b 65 79 20 69 73 20 70 | number |key is p|
|00004a00| 72 65 73 73 65 64 20 2d | 0a 65 2e 67 2e 20 74 6f |ressed -|.e.g. to|
|00004a10| 20 74 65 6c 6c 20 69 66 | 20 74 68 65 20 51 20 6b | tell if| the Q k|
|00004a20| 65 79 20 69 73 20 70 72 | 65 73 73 65 64 20 28 6d |ey is pr|essed (m|
|00004a30| 75 73 74 20 62 65 20 6c | 6f 77 65 72 63 61 73 65 |ust be l|owercase|
|00004a40| 29 3a 0a 0a 09 69 66 28 | 69 73 5f 6b 65 79 5f 70 |):...if(|is_key_p|
|00004a50| 72 65 73 73 65 64 28 73 | 63 61 6e 63 6f 64 65 5f |ressed(s|cancode_|
|00004a60| 74 72 61 6e 73 28 27 71 | 27 29 29 29 20 2e 2e 2e |trans('q|'))) ...|
|00004a70| 0a 0a 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 75 |..This r|outine u|
|00004a80| 73 65 73 20 61 20 63 6f | 70 79 20 6f 66 20 6b 65 |ses a co|py of ke|
|00004a90| 79 6d 61 70 20 30 20 28 | 6e 6f 20 6d 6f 64 69 66 |ymap 0 (|no modif|
|00004aa0| 69 65 72 73 29 20 61 73 | 20 68 65 6c 64 20 62 79 |iers) as| held by|
|00004ab0| 20 74 68 65 20 6b 65 72 | 6e 65 6c 3b 0a 73 65 65 | the ker|nel;.see|
|00004ac0| 20 6c 6f 61 64 6b 65 79 | 73 28 31 29 20 61 6e 64 | loadkey|s(1) and|
|00004ad0| 20 6b 65 79 74 61 62 6c | 65 73 28 35 29 20 66 6f | keytabl|es(5) fo|
|00004ae0| 72 20 6d 6f 72 65 20 69 | 6e 66 6f 2e 0a 0a 0a 76 |r more i|nfo....v|
|00004af0| 6f 69 64 20 73 65 74 5f | 73 77 69 74 63 68 5f 66 |oid set_|switch_f|
|00004b00| 75 6e 63 74 69 6f 6e 73 | 28 76 6f 69 64 20 28 2a |unctions|(void (*|
|00004b10| 6f 66 66 29 28 76 6f 69 | 64 29 2c 76 6f 69 64 20 |off)(voi|d),void |
|00004b20| 28 2a 6f 6e 29 28 76 6f | 69 64 29 29 0a 76 6f 69 |(*on)(vo|id)).voi|
|00004b30| 64 20 61 6c 6c 6f 77 5f | 73 77 69 74 63 68 28 69 |d allow_|switch(i|
|00004b40| 6e 74 20 6f 6e 29 0a 0a | 54 68 65 73 65 20 61 6c |nt on)..|These al|
|00004b50| 6c 6f 77 20 79 6f 75 20 | 74 6f 20 73 65 74 75 70 |low you |to setup|
|00004b60| 20 63 6f 6e 73 6f 6c 65 | 20 73 77 69 74 63 68 69 | console| switchi|
|00004b70| 6e 67 20 76 69 61 20 61 | 6c 74 2d 46 6e 2e 20 43 |ng via a|lt-Fn. C|
|00004b80| 61 6c 6c 20 74 68 65 73 | 65 0a 6c 69 6b 65 3a 0a |all thes|e.like:.|
|00004b90| 0a 09 73 65 74 5f 73 77 | 69 74 63 68 5f 66 75 6e |..set_sw|itch_fun|
|00004ba0| 63 74 69 6f 6e 73 28 75 | 6e 64 72 61 77 66 75 6e |ctions(u|ndrawfun|
|00004bb0| 63 2c 72 65 64 72 61 77 | 66 75 6e 63 29 3b 0a 09 |c,redraw|func);..|
|00004bc0| 61 6c 6c 6f 77 5f 73 77 | 69 74 63 68 28 31 29 3b |allow_sw|itch(1);|
|00004bd0| 0a 09 2e 2e 2e 0a 0a 2e | 2e 2e 77 68 65 72 65 20 |........|..where |
|00004be0| 75 6e 64 72 61 77 66 75 | 6e 63 28 29 20 70 75 74 |undrawfu|nc() put|
|00004bf0| 73 20 74 68 65 20 73 63 | 72 65 65 6e 20 69 6e 20 |s the sc|reen in |
|00004c00| 74 65 78 74 20 6d 6f 64 | 65 2c 20 61 6e 64 20 72 |text mod|e, and r|
|00004c10| 65 64 72 61 77 66 75 6e | 63 28 29 0a 67 6f 65 73 |edrawfun|c().goes|
|00004c20| 20 62 61 63 6b 20 74 6f | 20 67 72 61 70 68 69 63 | back to| graphic|
|00004c30| 73 20 61 6e 64 20 72 65 | 64 72 61 77 73 20 74 68 |s and re|draws th|
|00004c40| 65 20 73 63 72 65 65 6e | 2e 20 49 66 20 74 68 65 |e screen|. If the|
|00004c50| 20 75 73 65 72 20 70 72 | 65 73 73 65 73 20 61 6c | user pr|esses al|
|00004c60| 74 0a 61 6e 64 20 61 20 | 66 75 6e 63 74 69 6f 6e |t.and a |function|
|00004c70| 20 6b 65 79 20 74 68 69 | 73 20 69 73 20 64 65 74 | key thi|s is det|
|00004c80| 65 63 74 65 64 20 69 6e | 20 73 63 61 6e 5f 6b 65 |ected in| scan_ke|
|00004c90| 79 62 6f 61 72 64 28 29 | 2c 20 77 68 69 63 68 20 |yboard()|, which |
|00004ca0| 77 69 6c 6c 0a 65 66 66 | 65 63 74 69 76 65 6c 79 |will.eff|ectively|
|00004cb0| 20 62 6c 6f 63 6b 20 75 | 6e 74 69 6c 20 74 68 65 | block u|ntil the|
|00004cc0| 20 63 6f 6e 73 6f 6c 65 | 20 69 73 20 72 65 74 75 | console| is retu|
|00004cd0| 72 6e 65 64 20 74 6f 2e | 0a 0a 0a 54 68 69 73 20 |rned to.|...This |
|00004ce0| 70 72 6f 62 61 62 6c 79 | 20 61 6c 6c 20 6c 6f 6f |probably| all loo|
|00004cf0| 6b 73 20 72 61 74 68 65 | 72 20 63 6f 6e 66 75 73 |ks rathe|r confus|
|00004d00| 69 6e 67 2c 20 73 6f 20 | 70 6f 74 65 6e 74 69 61 |ing, so |potentia|
|00004d10| 6c 20 67 61 6d 65 73 20 | 77 72 69 74 65 72 73 20 |l games |writers |
|00004d20| 73 68 6f 75 6c 64 0a 6c | 6f 6f 6b 20 61 74 20 74 |should.l|ook at t|
|00004d30| 65 73 74 70 72 6f 67 2e | 63 20 61 6e 64 20 72 61 |estprog.|c and ra|
|00004d40| 77 6b 65 79 2e 68 20 66 | 6f 72 20 6d 6f 72 65 20 |wkey.h f|or more |
|00004d50| 63 6c 75 65 73 20 61 73 | 20 74 6f 20 68 6f 77 20 |clues as| to how |
|00004d60| 74 6f 20 67 6f 20 61 62 | 6f 75 74 20 75 73 69 6e |to go ab|out usin|
|00004d70| 67 0a 72 61 77 20 6b 65 | 79 62 6f 61 72 64 20 6d |g.raw ke|yboard m|
|00004d80| 6f 64 65 20 76 69 61 20 | 74 68 69 73 20 6c 69 62 |ode via |this lib|
|00004d90| 72 61 72 79 2e 0a 0a 0a | 45 70 69 6c 6f 67 75 65 |rary....|Epilogue|
|00004da0| 0a 2d 2d 2d 2d 2d 2d 2d | 2d 0a 0a 49 20 77 65 6c |.-------|-..I wel|
|00004db0| 63 6f 6d 65 20 62 75 67 | 20 72 65 70 6f 72 74 73 |come bug| reports|
|00004dc0| 2c 20 73 75 67 67 65 73 | 74 69 6f 6e 73 20 66 6f |, sugges|tions fo|
|00004dd0| 72 20 69 6d 70 72 6f 76 | 65 6d 65 6e 74 73 2c 20 |r improv|ements, |
|00004de0| 61 6e 79 74 68 69 6e 67 | 20 72 65 61 6c 6c 79 2e |anything| really.|
|00004df0| 0a 28 50 6c 65 61 73 65 | 20 62 65 61 72 20 69 6e |.(Please| bear in|
|00004e00| 20 6d 69 6e 64 2c 20 68 | 6f 77 65 76 65 72 2c 20 | mind, h|owever, |
|00004e10| 74 68 61 74 20 74 68 69 | 73 20 6c 69 62 72 61 72 |that thi|s librar|
|00004e20| 79 20 69 73 20 6f 6e 6c | 79 20 69 6e 74 65 6e 64 |y is onl|y intend|
|00004e30| 65 64 20 66 6f 72 20 74 | 68 65 0a 73 69 6d 70 6c |ed for t|he.simpl|
|00004e40| 65 20 6b 65 79 62 6f 61 | 72 64 20 75 73 65 20 6d |e keyboa|rd use m|
|00004e50| 61 64 65 20 62 79 20 67 | 61 6d 65 73 2e 20 41 6e |ade by g|ames. An|
|00004e60| 64 20 49 4d 48 4f 2c 20 | 6f 6e 6c 79 20 67 61 6d |d IMHO, |only gam|
|00004e70| 65 73 20 61 6e 64 20 65 | 6d 75 6c 61 74 6f 72 73 |es and e|mulators|
|00004e80| 20 73 68 6f 75 6c 64 0a | 65 76 65 72 20 6e 65 65 | should.|ever nee|
|00004e90| 64 20 74 6f 20 75 73 65 | 20 52 41 57 20 6d 6f 64 |d to use| RAW mod|
|00004ea0| 65 2e 29 0a 0a 49 66 20 | 79 6f 75 20 6e 65 65 64 |e.)..If |you need|
|00004eb0| 20 61 6e 79 20 68 65 6c | 70 20 75 73 69 6e 67 20 | any hel|p using |
|00004ec0| 69 74 2c 20 65 6d 61 69 | 6c 20 6d 65 20 61 6e 64 |it, emai|l me and|
|00004ed0| 20 49 27 6c 6c 20 74 72 | 79 20 74 6f 20 61 73 73 | I'll tr|y to ass|
|00004ee0| 69 73 74 20 79 6f 75 2e | 0a 0a 43 68 65 65 72 73 |ist you.|..Cheers|
|00004ef0| 2c 0a 2d 20 52 75 73 73 | 65 6c 6c 20 4d 61 72 6b |,.- Russ|ell Mark|
|00004f00| 73 20 28 6d 72 32 31 36 | 40 67 72 65 2e 61 63 2e |s (mr216|@gre.ac.|
|00004f10| 75 6b 29 0a 00 00 00 00 | 00 00 00 00 00 00 00 00 |uk).....|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005000| 72 61 77 6b 65 79 2f 74 | 65 73 74 70 72 6f 67 2e |rawkey/t|estprog.|
|00005010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005060| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00005070| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00005080| 20 20 20 32 34 36 33 20 | 20 35 36 35 32 35 33 37 | 2463 | 5652537|
|00005090| 34 34 37 20 20 31 32 34 | 37 36 00 20 30 00 00 00 |447 124|76. 0...|
|000050a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 2f 2a 20 74 65 73 74 70 | 72 6f 67 20 2d 20 73 69 |/* testp|rog - si|
|00005210| 6d 70 6c 65 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |mple exa|mple of |
|00005220| 68 6f 77 20 74 6f 20 75 | 73 65 20 74 68 65 20 72 |how to u|se the r|
|00005230| 61 77 6b 65 79 20 6c 69 | 62 72 61 72 79 20 28 75 |awkey li|brary (u|
|00005240| 73 69 6e 67 20 73 76 67 | 61 6c 69 62 29 2e 0a 20 |sing svg|alib).. |
|00005250| 2a 0a 20 2a 20 54 68 65 | 20 63 75 72 73 6f 72 20 |*. * The| cursor |
|00005260| 6b 65 79 73 20 6d 6f 76 | 65 20 61 20 64 6f 74 20 |keys mov|e a dot |
|00005270| 61 72 6f 75 6e 64 20 74 | 68 65 20 73 63 72 65 65 |around t|he scree|
|00005280| 6e 20 2d 20 65 73 63 20 | 6f 72 20 78 20 65 6e 64 |n - esc |or x end|
|00005290| 73 2e 0a 20 2a 20 55 73 | 69 6e 67 20 73 63 61 6e |s.. * Us|ing scan|
|000052a0| 5f 6b 65 79 62 6f 61 72 | 64 28 29 20 61 6e 64 20 |_keyboar|d() and |
|000052b0| 69 73 5f 6b 65 79 5f 70 | 72 65 73 73 65 64 28 29 |is_key_p|ressed()|
|000052c0| 20 6f 62 76 69 6f 75 73 | 6c 79 20 61 6c 6c 6f 77 | obvious|ly allow|
|000052d0| 73 20 79 6f 75 20 74 6f | 20 68 61 76 65 0a 20 2a |s you to| have. *|
|000052e0| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 65 20 6b | more th|an one k|
|000052f0| 65 79 20 70 72 65 73 73 | 65 64 20 61 74 20 6f 6e |ey press|ed at on|
|00005300| 63 65 2c 20 61 6e 64 20 | 61 76 6f 69 64 73 20 74 |ce, and |avoids t|
|00005310| 68 65 20 6b 65 79 20 72 | 65 70 65 61 74 20 70 72 |he key r|epeat pr|
|00005320| 6f 62 6c 65 6d 2e 0a 20 | 2a 0a 20 2a 20 46 65 65 |oblem.. |*. * Fee|
|00005330| 6c 20 66 72 65 65 20 74 | 6f 20 70 69 6e 63 68 20 |l free t|o pinch |
|00005340| 62 69 74 73 20 6f 75 74 | 20 6f 66 20 74 68 69 73 |bits out| of this|
|00005350| 2c 20 6f 72 20 77 68 61 | 74 65 76 65 72 2e 0a 20 |, or wha|tever.. |
|00005360| 2a 2f 0a 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |*/..#inc|lude <st|
|00005370| 64 69 6f 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |dio.h>.#|include |
|00005380| 3c 75 6e 69 73 74 64 2e | 68 3e 0a 23 69 6e 63 6c |<unistd.|h>.#incl|
|00005390| 75 64 65 20 3c 76 67 61 | 2e 68 3e 0a 23 69 6e 63 |ude <vga|.h>.#inc|
|000053a0| 6c 75 64 65 20 3c 72 61 | 77 6b 65 79 2e 68 3e 0a |lude <ra|wkey.h>.|
|000053b0| 0a 0a 6d 61 69 6e 28 29 | 0a 7b 0a 69 6e 74 20 63 |..main()|.{.int c|
|000053c0| 2c 78 2c 79 2c 66 3b 0a | 0a 76 67 61 5f 69 6e 69 |,x,y,f;.|.vga_ini|
|000053d0| 74 28 29 3b 0a 0a 76 67 | 61 5f 73 65 74 6d 6f 64 |t();..vg|a_setmod|
|000053e0| 65 28 47 33 32 30 78 32 | 30 30 78 32 35 36 29 3b |e(G320x2|00x256);|
|000053f0| 0a 0a 69 66 28 21 72 61 | 77 6d 6f 64 65 5f 69 6e |..if(!ra|wmode_in|
|00005400| 69 74 28 29 29 0a 20 20 | 7b 0a 20 20 70 72 69 6e |it()). |{. prin|
|00005410| 74 66 28 22 43 6f 75 6c | 64 6e 27 74 20 73 74 61 |tf("Coul|dn't sta|
|00005420| 72 74 75 70 20 52 41 57 | 20 6d 6f 64 65 20 2d 20 |rtup RAW| mode - |
|00005430| 2f 64 65 76 2f 74 74 79 | 30 20 75 6e 72 65 61 64 |/dev/tty|0 unread|
|00005440| 61 62 6c 65 3f 5c 6e 22 | 29 3b 0a 20 20 65 78 69 |able?\n"|);. exi|
|00005450| 74 28 31 29 3b 0a 20 20 | 7d 0a 0a 78 3d 31 36 30 |t(1);. |}..x=160|
|00005460| 3b 20 79 3d 31 30 30 3b | 0a 0a 64 6f 0a 20 20 7b |; y=100;|..do. {|
|00005470| 0a 20 20 76 67 61 5f 64 | 72 61 77 70 69 78 65 6c |. vga_d|rawpixel|
|00005480| 28 78 2c 79 29 3b 0a 20 | 20 75 73 6c 65 65 70 28 |(x,y);. | usleep(|
|00005490| 31 30 30 30 30 29 3b 09 | 2f 2a 20 73 6c 65 65 70 |10000);.|/* sleep|
|000054a0| 20 66 6f 72 20 61 20 62 | 69 74 20 74 6f 20 61 76 | for a b|it to av|
|000054b0| 6f 69 64 20 62 75 72 6e | 69 6e 67 20 43 50 55 20 |oid burn|ing CPU |
|000054c0| 2a 2f 0a 0a 20 20 73 63 | 61 6e 5f 6b 65 79 62 6f |*/.. sc|an_keybo|
|000054d0| 61 72 64 28 29 3b 0a 0a | 20 20 2f 2a 20 74 68 65 |ard();..| /* the|
|000054e0| 20 43 55 52 53 4f 52 5f | 4c 45 46 54 20 65 74 63 | CURSOR_|LEFT etc|
|000054f0| 2e 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 69 6e |. are de|fined in|
|00005500| 20 72 61 77 6b 65 79 2e | 68 2c 20 61 6e 64 20 61 | rawkey.|h, and a|
|00005510| 72 65 20 73 63 61 6e 63 | 6f 64 65 73 20 2d 0a 20 |re scanc|odes -. |
|00005520| 20 20 2a 20 66 6f 72 2c | 20 73 61 79 2c 20 74 68 | * for,| say, th|
|00005530| 65 20 51 20 6b 65 79 2c | 20 79 6f 75 27 64 20 73 |e Q key,| you'd s|
|00005540| 61 79 20 22 73 63 61 6e | 63 6f 64 65 5f 74 72 61 |ay "scan|code_tra|
|00005550| 6e 73 28 27 71 27 29 22 | 2e 0a 20 20 20 2a 20 6e |ns('q')"|.. * n|
|00005560| 6f 74 65 20 74 68 61 74 | 20 73 79 6d 62 6f 6c 73 |ote that| symbols|
|00005570| 20 6f 6e 6c 79 20 6f 62 | 74 61 69 6e 65 64 20 62 | only ob|tained b|
|00005580| 79 20 73 68 69 66 74 69 | 6e 67 20 77 6f 6e 27 74 |y shifti|ng won't|
|00005590| 20 62 65 20 72 65 63 6f | 67 6e 69 73 65 64 20 62 | be reco|gnised b|
|000055a0| 79 0a 20 20 20 2a 20 73 | 63 61 6e 63 6f 64 65 5f |y. * s|cancode_|
|000055b0| 74 72 61 6e 73 28 29 2c | 20 73 6f 20 79 6f 75 20 |trans(),| so you |
|000055c0| 73 68 6f 75 6c 64 20 6f | 6e 6c 79 20 72 65 61 6c |should o|nly real|
|000055d0| 6c 79 20 75 73 65 20 69 | 74 20 66 6f 72 20 61 6c |ly use i|t for al|
|000055e0| 70 68 61 6e 75 6d 65 72 | 69 63 73 2e 0a 20 20 20 |phanumer|ics.. |
|000055f0| 2a 2f 0a 20 20 69 66 28 | 69 73 5f 6b 65 79 5f 70 |*/. if(|is_key_p|
|00005600| 72 65 73 73 65 64 28 43 | 55 52 53 4f 52 5f 4c 45 |ressed(C|URSOR_LE|
|00005610| 46 54 29 20 20 26 26 20 | 78 3e 30 29 09 78 2d 2d |FT) && |x>0).x--|
|00005620| 3b 0a 20 20 69 66 28 69 | 73 5f 6b 65 79 5f 70 72 |;. if(i|s_key_pr|
|00005630| 65 73 73 65 64 28 43 55 | 52 53 4f 52 5f 52 49 47 |essed(CU|RSOR_RIG|
|00005640| 48 54 29 20 26 26 20 78 | 3c 33 31 39 29 09 78 2b |HT) && x|<319).x+|
|00005650| 2b 3b 0a 20 20 69 66 28 | 69 73 5f 6b 65 79 5f 70 |+;. if(|is_key_p|
|00005660| 72 65 73 73 65 64 28 43 | 55 52 53 4f 52 5f 55 50 |ressed(C|URSOR_UP|
|00005670| 29 20 20 20 20 26 26 20 | 79 3e 30 29 09 79 2d 2d |) && |y>0).y--|
|00005680| 3b 0a 20 20 69 66 28 69 | 73 5f 6b 65 79 5f 70 72 |;. if(i|s_key_pr|
|00005690| 65 73 73 65 64 28 43 55 | 52 53 4f 52 5f 44 4f 57 |essed(CU|RSOR_DOW|
|000056a0| 4e 29 20 20 26 26 20 79 | 3c 31 39 39 29 09 79 2b |N) && y|<199).y+|
|000056b0| 2b 3b 0a 20 20 7d 0a 77 | 68 69 6c 65 28 21 69 73 |+;. }.w|hile(!is|
|000056c0| 5f 6b 65 79 5f 70 72 65 | 73 73 65 64 28 73 63 61 |_key_pre|ssed(sca|
|000056d0| 6e 63 6f 64 65 5f 74 72 | 61 6e 73 28 27 78 27 29 |ncode_tr|ans('x')|
|000056e0| 29 20 26 26 20 21 69 73 | 5f 6b 65 79 5f 70 72 65 |) && !is|_key_pre|
|000056f0| 73 73 65 64 28 45 53 43 | 41 50 45 5f 4b 45 59 29 |ssed(ESC|APE_KEY)|
|00005700| 29 3b 0a 0a 76 67 61 5f | 73 65 74 6d 6f 64 65 28 |);..vga_|setmode(|
|00005710| 54 45 58 54 29 3b 0a 0a | 72 61 77 6d 6f 64 65 5f |TEXT);..|rawmode_|
|00005720| 65 78 69 74 28 29 3b 0a | 65 78 69 74 28 30 29 3b |exit();.|exit(0);|
|00005730| 0a 7d 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00005740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005800| 72 61 77 6b 65 79 2f 43 | 68 61 6e 67 65 4c 6f 67 |rawkey/C|hangeLog|
|00005810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005860| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 20 20 36 |.... 6|00 . 6|
|00005870| 32 35 20 00 20 20 20 20 | 20 36 20 00 20 20 20 20 |25 . | 6 . |
|00005880| 20 20 20 31 32 31 30 20 | 20 35 36 35 32 35 34 30 | 1210 | 5652540|
|00005890| 33 30 35 20 20 31 32 32 | 30 35 00 20 30 00 00 00 |305 122|05. 0...|
|000058a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005900| 00 75 73 74 61 72 20 20 | 00 72 75 73 00 00 00 00 |.ustar |.rus....|
|00005910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005920| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00005930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a00| 53 75 6e 20 4f 63 74 20 | 32 33 20 31 39 3a 35 36 |Sun Oct |23 19:56|
|00005a10| 3a 34 33 20 31 39 39 34 | 20 20 52 75 73 73 65 6c |:43 1994| Russel|
|00005a20| 6c 20 4d 61 72 6b 73 20 | 20 28 72 75 73 40 6c 69 |l Marks | (rus@li|
|00005a30| 66 65 73 6f 6e 29 0a 0a | 09 2a 20 41 64 64 65 64 |feson)..|.* Added|
|00005a40| 20 76 74 20 73 77 69 74 | 63 68 69 6e 67 20 73 74 | vt swit|ching st|
|00005a50| 75 66 66 2e 20 59 6f 75 | 20 6e 65 65 64 20 74 6f |uff. You| need to|
|00005a60| 20 73 70 65 63 69 66 79 | 20 74 77 6f 20 66 75 6e | specify| two fun|
|00005a70| 63 74 69 6f 6e 73 2c 20 | 6f 6e 65 0a 09 66 6f 72 |ctions, |one..for|
|00005a80| 20 27 75 6e 64 72 61 77 | 69 6e 67 27 20 79 6f 75 | 'undraw|ing' you|
|00005a90| 72 20 73 63 72 65 65 6e | 20 28 69 2e 65 2e 20 72 |r screen| (i.e. r|
|00005aa0| 65 74 75 72 6e 69 6e 67 | 20 74 6f 20 74 65 78 74 |eturning| to text|
|00005ab0| 20 6d 6f 64 65 29 20 61 | 6e 64 20 6f 6e 65 0a 09 | mode) a|nd one..|
|00005ac0| 66 6f 72 20 27 72 65 64 | 72 61 77 69 6e 67 27 20 |for 'red|rawing' |
|00005ad0| 69 74 20 28 69 66 20 79 | 6f 75 72 20 70 72 6f 67 |it (if y|our prog|
|00005ae0| 72 61 6d 20 72 65 66 72 | 65 73 68 65 73 20 61 6c |ram refr|eshes al|
|00005af0| 6c 20 74 68 65 20 74 69 | 6d 65 2c 20 79 6f 75 0a |l the ti|me, you.|
|00005b00| 09 63 61 6e 20 6a 75 73 | 74 20 73 77 69 74 63 68 |.can jus|t switch|
|00005b10| 20 62 61 63 6b 20 74 6f | 20 67 72 61 70 68 69 63 | back to| graphic|
|00005b20| 73 20 6d 6f 64 65 29 2e | 20 59 6f 75 20 74 68 65 |s mode).| You the|
|00005b30| 6e 20 6e 65 65 64 20 74 | 6f 20 65 6e 61 62 6c 65 |n need t|o enable|
|00005b40| 20 76 74 0a 09 73 77 69 | 74 63 68 69 6e 67 2c 20 | vt..swi|tching, |
|00005b50| 77 68 69 63 68 20 69 73 | 20 74 68 65 6e 20 63 68 |which is| then ch|
|00005b60| 65 63 6b 65 64 20 66 6f | 72 20 77 68 65 6e 65 76 |ecked fo|r whenev|
|00005b70| 65 72 20 79 6f 75 20 75 | 73 65 0a 09 73 63 61 6e |er you u|se..scan|
|00005b80| 5f 6b 65 79 62 6f 61 72 | 64 28 29 2e 20 59 6f 75 |_keyboar|d(). You|
|00005b90| 72 20 70 72 6f 67 72 61 | 6d 20 77 69 6c 6c 20 70 |r progra|m will p|
|00005ba0| 61 75 73 65 20 77 68 65 | 6e 65 76 65 72 20 61 6e |ause whe|never an|
|00005bb0| 6f 74 68 65 72 20 63 6f | 6e 73 6f 6c 65 0a 09 69 |other co|nsole..i|
|00005bc0| 73 20 73 77 69 74 63 68 | 65 64 20 74 6f 2e 0a 0a |s switch|ed to...|
|00005bd0| 09 2a 20 42 75 67 66 69 | 78 3a 20 64 69 73 61 62 |.* Bugfi|x: disab|
|00005be0| 6c 65 20 63 74 72 6c 2d | 63 20 28 74 68 69 73 20 |le ctrl-|c (this |
|00005bf0| 6d 65 61 6e 74 20 74 68 | 61 74 20 70 72 65 73 73 |meant th|at press|
|00005c00| 69 6e 67 20 74 68 65 20 | 27 32 27 20 6b 65 79 0a |ing the |'2' key.|
|00005c10| 09 77 6f 75 6c 64 20 63 | 61 75 73 65 20 62 61 64 |.would c|ause bad|
|00005c20| 20 74 68 69 6e 67 73 20 | 74 6f 20 68 61 70 70 65 | things |to happe|
|00005c30| 6e 29 20 61 6e 64 20 73 | 69 6d 69 6c 61 72 20 6b |n) and s|imilar k|
|00005c40| 65 79 73 2e 20 49 6e 20 | 6f 74 68 65 72 0a 09 77 |eys. In |other..w|
|00005c50| 6f 72 64 73 2c 20 74 75 | 72 6e 20 6f 66 66 20 49 |ords, tu|rn off I|
|00005c60| 53 49 47 20 61 6e 64 20 | 49 43 41 4e 4f 4e 2e 0a |SIG and |ICANON..|
|00005c70| 0a 09 2a 20 53 74 61 72 | 74 65 64 20 63 68 61 6e |..* Star|ted chan|
|00005c80| 67 65 6c 6f 67 2e 0a 0a | 00 00 00 00 00 00 00 00 |gelog...|........|
|00005c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006000| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000060f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000061f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.